mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:54:03 +00:00
tenantUnwareFeature interface
This commit is contained in:
parent
36afb7dbdd
commit
5bbd09576e
2 changed files with 13 additions and 9 deletions
10
src/Contracts/TenantUnwareFeature.php
Normal file
10
src/Contracts/TenantUnwareFeature.php
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Stancl\Tenancy\Contracts;
|
||||||
|
|
||||||
|
interface TenantUnwareFeature
|
||||||
|
{
|
||||||
|
public function bootstrap(): void;
|
||||||
|
}
|
||||||
|
|
@ -5,17 +5,11 @@ declare(strict_types=1);
|
||||||
namespace Stancl\Tenancy\Features;
|
namespace Stancl\Tenancy\Features;
|
||||||
|
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Stancl\Tenancy\Contracts\Feature;
|
use Stancl\Tenancy\Contracts\TenantUnwareFeature;
|
||||||
use Stancl\Tenancy\Tenancy;
|
|
||||||
|
|
||||||
class CrossDomainRedirect implements Feature
|
class CrossDomainRedirect implements TenantUnwareFeature
|
||||||
{
|
{
|
||||||
public function __construct(protected Tenancy $tenancy)
|
public function bootstrap(): void
|
||||||
{
|
|
||||||
dd($this->tenancy);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bootstrap(Tenancy $tenancy): void
|
|
||||||
{
|
{
|
||||||
RedirectResponse::macro('domain', function (string $domain) {
|
RedirectResponse::macro('domain', function (string $domain) {
|
||||||
/** @var RedirectResponse $this */
|
/** @var RedirectResponse $this */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue