mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:14:03 +00:00
Initial commit
This commit is contained in:
commit
deb3ad77f5
19 changed files with 1283 additions and 0 deletions
21
src/helpers.php
Normal file
21
src/helpers.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
use Stancl\Tenancy\TenantManager;
|
||||
|
||||
if (! function_exists('tenancy')) {
|
||||
function tenancy($key = null)
|
||||
{
|
||||
if ($key) {
|
||||
return app(TenantManager::class)->tenant[$key];
|
||||
}
|
||||
|
||||
return app(TenantManager::class);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('tenant')) {
|
||||
function tenant($key = null)
|
||||
{
|
||||
return tenancy($key);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue