From f99ecb72c70f7d83bd4084666eb53fcbe0dc763d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 3 Dec 2019 22:52:30 +0100 Subject: [PATCH] Don't accept closures in tenant() helper --- src/helpers.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/helpers.php b/src/helpers.php index 3f7f98ab..67acd2fb 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -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; } }