1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 21:54:03 +00:00

Only bind UUID generator if one is specified in config (#493)

This commit is contained in:
domkrm 2020-09-16 15:06:24 +02:00 committed by GitHub
parent 5fe79fea33
commit 218a34c40e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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']);