mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:54:05 +00:00
Register new MigrateMake command
This commit is contained in:
parent
676401931d
commit
d65f69c66d
1 changed files with 14 additions and 0 deletions
|
|
@ -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']);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue