diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index 58ae70f2..946f114f 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -54,7 +54,9 @@ class TenancyServiceProvider extends ServiceProvider } // Bind the class in the tenancy.id_generator config to the UniqueIdentifierGenerator abstract. - $this->app->bind(Contracts\UniqueIdentifierGenerator::class, $this->app['config']['tenancy.id_generator']); + if (! is_null($this->app['config']['tenancy.id_generator'])) { + $this->app->bind(Contracts\UniqueIdentifierGenerator::class, $this->app['config']['tenancy.id_generator']); + } $this->app->singleton(Commands\Migrate::class, function ($app) { return new Commands\Migrate($app['migrator'], $app['events']);