1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:54:03 +00:00

tenantUnwareFeature interface

This commit is contained in:
Abrar Ahmad 2022-11-23 16:17:44 +05:00
parent 36afb7dbdd
commit 5bbd09576e
2 changed files with 13 additions and 9 deletions

View file

@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Contracts;
interface TenantUnwareFeature
{
public function bootstrap(): void;
}

View file

@ -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 */