mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 17:24:03 +00:00
vague first draft of v3. TenantModelTest is passing
This commit is contained in:
parent
c2c90ff755
commit
bd9aad229b
56 changed files with 803 additions and 1366 deletions
|
|
@ -2,18 +2,14 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Stancl\Tenancy\Tenant;
|
||||
use Stancl\Tenancy\TenantManager;
|
||||
use Stancl\Tenancy\Database\Models\Tenant;
|
||||
use Stancl\Tenancy\Tenancy;
|
||||
|
||||
if (! function_exists('tenancy')) {
|
||||
/** @return TenantManager|mixed */
|
||||
function tenancy($key = null)
|
||||
/** @return Tenancy */
|
||||
function tenancy()
|
||||
{
|
||||
if ($key) {
|
||||
return app(TenantManager::class)->getTenant($key) ?? null;
|
||||
}
|
||||
|
||||
return app(TenantManager::class);
|
||||
return app(Tenancy::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue