mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 10:44:03 +00:00
Better Tenant facade
This commit is contained in:
parent
032069af6d
commit
cc5822e230
1 changed files with 7 additions and 2 deletions
|
|
@ -5,13 +5,18 @@ declare(strict_types=1);
|
||||||
namespace Stancl\Tenancy\Facades;
|
namespace Stancl\Tenancy\Facades;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Facade;
|
use Illuminate\Support\Facades\Facade;
|
||||||
use Stancl\Tenancy\Tenant as Tenant;
|
use Stancl\Tenancy\Tenant;
|
||||||
|
|
||||||
// todo2 rename to CurrentTenant?
|
|
||||||
class TenantFacade extends Facade
|
class TenantFacade extends Facade
|
||||||
{
|
{
|
||||||
protected static function getFacadeAccessor()
|
protected static function getFacadeAccessor()
|
||||||
{
|
{
|
||||||
return Tenant::class;
|
return Tenant::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo test this
|
||||||
|
public static function create($domains, array $data): Tenant
|
||||||
|
{
|
||||||
|
return Tenant::create($domains, $data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue