mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:34:03 +00:00
Automatic mode
This commit is contained in:
parent
2492345280
commit
73fc525126
16 changed files with 154 additions and 40 deletions
|
|
@ -26,14 +26,14 @@ class Tenancy
|
|||
|
||||
$this->initialized = true;
|
||||
|
||||
event(new Events\TenancyInitialized($tenant));
|
||||
event(new Events\TenancyInitialized($this));
|
||||
}
|
||||
|
||||
public function end(): void
|
||||
{
|
||||
$this->initialized = false;
|
||||
|
||||
event(new Events\TenancyEnded($this->tenant));
|
||||
event(new Events\TenancyEnded($this));
|
||||
|
||||
$this->tenant = null;
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ class Tenancy
|
|||
{
|
||||
// If no callback for getting bootstrappers is set, we just return all of them.
|
||||
$resolve = static::$getBootstrappers ?? function (Tenant $tenant) {
|
||||
return config('tenancy.bootstrappers');
|
||||
return array_map('app', config('tenancy.bootstrappers'));
|
||||
};
|
||||
|
||||
return $resolve($this->tenant);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue