1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:44:04 +00:00

[2.1.0] Tenant Run (#163)

* $tenant->run()

* Add assertion
This commit is contained in:
Samuel Štancl 2019-10-11 21:02:54 +02:00 committed by GitHub
parent cc74e9f3ca
commit a1270189da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 94 additions and 0 deletions

View file

@ -206,6 +206,10 @@ class TenantManager
*/
public function initializeTenancy(Tenant $tenant): self
{
if ($this->initialized) {
$this->endTenancy();
}
$this->setTenant($tenant);
$this->bootstrapTenancy($tenant);
$this->initialized = true;