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

Move DatabaseManager

This commit is contained in:
Samuel Štancl 2020-05-30 15:38:29 +02:00
parent 16a598bb17
commit 579779b88b
9 changed files with 13 additions and 27 deletions

View file

@ -20,7 +20,7 @@ class TenancyServiceProvider extends ServiceProvider
{
$this->mergeConfigFrom(__DIR__ . '/../assets/config.php', 'tenancy');
$this->app->singleton(DatabaseManager::class);
$this->app->singleton(Database\DatabaseManager::class);
// Make sure Tenancy is stateful.
$this->app->singleton(Tenancy::class);
@ -48,13 +48,13 @@ class TenancyServiceProvider extends ServiceProvider
$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[DatabaseManager::class]);
return new Commands\Migrate($app['migrator']);
});
$this->app->singleton(Commands\Rollback::class, function ($app) {
return new Commands\Rollback($app['migrator'], $app[DatabaseManager::class]);
return new Commands\Rollback($app['migrator']);
});
$this->app->singleton(Commands\Seed::class, function ($app) {
return new Commands\Seed($app['db'], $app[DatabaseManager::class]);
return new Commands\Seed($app['db']);
});
$this->app->bind('globalCache', function ($app) {