diff --git a/src/Multitenancy.php b/src/Multitenancy.php index 257375a..17b631b 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;