mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 02:04:03 +00:00
Storage drivers WIP
This commit is contained in:
parent
7eba041509
commit
69db512d30
6 changed files with 128 additions and 49 deletions
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Stancl\Tenancy\Tenant;
|
||||
use Stancl\Tenancy\TenantManager;
|
||||
|
||||
if (! \function_exists('tenancy')) {
|
||||
function tenancy($key = null)
|
||||
{
|
||||
if ($key) {
|
||||
return app(TenantManager::class)->tenant[$key] ?? null;
|
||||
return app(TenantManager::class)->getTenant($key) ?? null;
|
||||
}
|
||||
|
||||
return app(TenantManager::class);
|
||||
|
|
@ -18,7 +19,9 @@ if (! \function_exists('tenancy')) {
|
|||
if (! \function_exists('tenant')) {
|
||||
function tenant($key = null)
|
||||
{
|
||||
return tenancy($key);
|
||||
if (! is_null($key)) {
|
||||
return app(Tenant::class)->get($key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue