mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:54:05 +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;
|
||||
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue