1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 10:44:04 +00:00

Rewrite old tests

This commit is contained in:
Samuel Štancl 2020-05-12 23:22:40 +02:00
parent 64383b4c56
commit 89936187ce
71 changed files with 698 additions and 3203 deletions

View file

@ -24,6 +24,13 @@ class TenancyServiceProvider extends ServiceProvider
$this->app->bind(Contracts\UniqueIdentifierGenerator::class, $this->app['config']['tenancy.id_generator']);
$this->app->singleton(DatabaseManager::class);
$this->app->singleton(Tenancy::class);
$this->app->extend(Tenancy::class, function (Tenancy $tenancy) {
foreach ($this->app['config']['tenancy.features'] as $feature) {
$this->app[$feature]->bootstrap($tenancy);
}
return $tenancy;
});
$this->app->bind(Tenant::class, function ($app) {
return $app[Tenancy::class]->tenant;
});
@ -63,7 +70,6 @@ class TenancyServiceProvider extends ServiceProvider
Commands\Migrate::class,
Commands\Rollback::class,
Commands\TenantList::class,
Commands\CreateTenant::class,
Commands\MigrateFresh::class,
]);