mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
28 lines
537 B
PHP
28 lines
537 B
PHP
<?php
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
if (! function_exists('tenant')) {
|
|
function tenant($key = null)
|
|
{
|
|
return tenancy($key);
|
|
}
|
|
}
|
|
|
|
if (! function_exists('tenant_asset')) {
|
|
function tenant_asset($asset)
|
|
{
|
|
return route('stancl.tenancy.asset', ['asset' => $asset]);
|
|
}
|
|
}
|