mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 21:54:03 +00:00
Shared users - complete
This commit is contained in:
parent
daae67c0f7
commit
b7c8f1fba7
12 changed files with 488 additions and 56 deletions
|
|
@ -42,9 +42,9 @@ class DatabaseManager
|
|||
*/
|
||||
public function connectToTenant(TenantWithDatabase $tenant)
|
||||
{
|
||||
$this->database->purge('tenant');
|
||||
$this->createTenantConnection($tenant);
|
||||
$this->setDefaultConnection('tenant');
|
||||
$this->database->purge('tenant');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -55,6 +55,7 @@ class DatabaseManager
|
|||
if (tenancy()->initialized) {
|
||||
$this->database->purge('tenant');
|
||||
}
|
||||
|
||||
$this->setDefaultConnection($this->config->get('tenancy.central_connection'));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue