1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:54:05 +00:00
tenancy/src/helpers.php
2019-02-13 13:23:09 +01:00

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]);
}
}