mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:34:03 +00:00
optional for tenant()
This commit is contained in:
parent
e88801a4d1
commit
102ade4d8c
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ if (! \function_exists('tenant')) {
|
|||
function tenant($key = null)
|
||||
{
|
||||
if (! is_null($key)) {
|
||||
return app(Tenant::class)->get($key);
|
||||
return optional(app(Tenant::class))->get($key) ?? null;
|
||||
}
|
||||
|
||||
return app(Tenant::class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue