1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 20:14:04 +00:00
tenancy/src/helpers.php
Samuel Štancl 2fd3662eb7
[1.8.0] Use strict types (#115)
* Use strict types

* Apply fixes from StyleCI

* Fix str_repeat

* Fix false json decode
2019-08-23 18:18:26 +02:00

30 lines
566 B
PHP

<?php
declare(strict_types=1);
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]);
}
}