1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 12:54:05 +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;
use Illuminate\Http\RedirectResponse;
use Stancl\Tenancy\Contracts\Feature;
use Stancl\Tenancy\Tenancy;
use Stancl\Tenancy\Contracts\TenantUnwareFeature;
class CrossDomainRedirect implements Feature
class CrossDomainRedirect implements TenantUnwareFeature
{
public function __construct(protected Tenancy $tenancy)
{
dd($this->tenancy);
}
public function bootstrap(Tenancy $tenancy): void
public function bootstrap(): void
{
RedirectResponse::macro('domain', function (string $domain) {
/** @var RedirectResponse $this */