1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 15:14:04 +00:00
tenancy/src/helpers.php
2019-08-16 16:21:59 +00:00

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