1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 11:34:02 +00:00

Register new MigrateMake command

This commit is contained in:
Victor R 2022-01-14 13:16:49 -05:00 committed by GitHub
parent 676401931d
commit d65f69c66d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,6 +72,8 @@ class TenancyServiceProvider extends ServiceProvider
$this->app->bind('globalCache', function ($app) { $this->app->bind('globalCache', function ($app) {
return new CacheManager($app); return new CacheManager($app);
}); });
$this->registerMigrateMakeCommand();
} }
/** /**
@ -126,4 +128,16 @@ class TenancyServiceProvider extends ServiceProvider
return $instance; return $instance;
}); });
} }
protected function registerMigrateMakeCommand(): void
{
$this->app->when(MigrationCreator::class)
->needs('$customStubPath')
->give(fn ($app) => $app->basePath('stubs'));
$this->app->singleton('command.migrate.make', function ($app) {
return new MigrateMakeCommand($app['migration.creator'], $app['composer']);
});
}
} }