mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:14:04 +00:00
Don't accept closures in tenant() helper
This commit is contained in:
parent
9851f088ea
commit
f99ecb72c7
1 changed files with 1 additions and 5 deletions
|
|
@ -21,7 +21,7 @@ if (! function_exists('tenant')) {
|
|||
/**
|
||||
* Get a key from the current tenant's storage.
|
||||
*
|
||||
* @param string|Closure|null $key
|
||||
* @param string|null $key
|
||||
* @return Tenant|mixed
|
||||
*/
|
||||
function tenant($key = null)
|
||||
|
|
@ -30,10 +30,6 @@ if (! function_exists('tenant')) {
|
|||
return app(Tenant::class);
|
||||
}
|
||||
|
||||
if ($key instanceof Closure) {
|
||||
return app(Tenant::class)->run($key);
|
||||
}
|
||||
|
||||
return optional(app(Tenant::class))->get($key) ?? null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue