From 57da182362586e9a2a0cd3efcb8808ad70bbcbb0 Mon Sep 17 00:00:00 2001 From: Ehsan Mahmoodi Date: Thu, 23 May 2024 06:41:03 +0330 Subject: [PATCH] Update Multitenancy.php --- src/Multitenancy.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Multitenancy.php b/src/Multitenancy.php index 257375a8..17b631b5 100644 --- a/src/Multitenancy.php +++ b/src/Multitenancy.php @@ -65,8 +65,10 @@ protected function registerTasksCollection(): self protected function registerTenantFinder(): self { - if ($this->app['config']->get('multitenancy.tenant_finder')) { - $this->app->bind(TenantFinder::class, $this->app['config']->get('multitenancy.tenant_finder')); + $tenantFinderConfig = $this->app['config']->get('multitenancy.tenant_finder'); + + if ($tenantFinderConfig) { + $this->app->bind(TenantFinder::class, $tenantFinderConfig); } return $this;