1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00

Return null if key is not found in TenantManager->tenant

This commit is contained in:
Samuel Štancl 2019-01-23 21:00:11 +01:00
parent 89c073a859
commit 4ef285061a

View file

@ -6,7 +6,7 @@ if (! function_exists('tenancy')) {
function tenancy($key = null)
{
if ($key) {
return app(TenantManager::class)->tenant[$key];
return app(TenantManager::class)->tenant[$key] ?? null;
}
return app(TenantManager::class);