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);