From 102ade4d8c61c5592a5df311d59ecca584a83c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 30 Sep 2019 19:43:59 +0200 Subject: [PATCH] optional for tenant() --- src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.php b/src/helpers.php index 86455dc0..56d4cf08 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -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);