mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 09:54:03 +00:00
Merge branch 'saas' of github.com:stancl/tenancy into saas
This commit is contained in:
commit
081799e233
3 changed files with 10 additions and 3 deletions
|
|
@ -78,7 +78,9 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
__DIR__ . '/../assets/migrations/' => database_path('migrations'),
|
||||
], 'migrations');
|
||||
|
||||
$this->app->make(Kernel::class)->prependMiddleware(Middleware\InitializeTenancy::class);
|
||||
if ($this->app['config']['tenancy.push_initialization_middleware_to_global_stack'] ?? true) {
|
||||
$this->app->make(Kernel::class)->prependMiddleware(Middleware\InitializeTenancy::class);
|
||||
}
|
||||
|
||||
/*
|
||||
* Since tenancy is initialized in the global middleware stack, this
|
||||
|
|
|
|||
|
|
@ -301,6 +301,10 @@ class TenantManager
|
|||
|
||||
public function endTenancy(): self
|
||||
{
|
||||
if (! $this->initialized) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$prevented = $this->event('ending', $this->getTenant());
|
||||
|
||||
foreach ($this->tenancyBootstrappers($prevented) as $bootstrapper) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue