diff --git a/src/helpers.php b/src/helpers.php index 09ba118f..0041f131 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -6,7 +6,7 @@ if (! function_exists('tenancy')) { function tenancy($key = null) { if ($key) { - return app(TenantManager::class)->tenant[$key]; + return app(TenantManager::class)->tenant[$key] ?? null; } return app(TenantManager::class);