1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:14:03 +00:00

Make phpunit run

This commit is contained in:
Samuel Štancl 2020-04-30 21:25:41 +02:00
parent b07f5bdc22
commit 2de46e4274
8 changed files with 40 additions and 22 deletions

View file

@ -54,9 +54,9 @@ class DatabaseManager
*/
public function connect(Tenant $tenant)
{
$this->createTenantConnection($tenant, $tenant->getConnectionName());
$this->setDefaultConnection($tenant->getConnectionName());
$this->switchConnection($tenant->getConnectionName());
$this->createTenantConnection($tenant, $tenant->database()->getTemplateConnectionName());
$this->setDefaultConnection($tenant->database()->getTemplateConnectionName());
$this->switchConnection($tenant->database()->getTemplateConnectionName());
}
/**
@ -83,7 +83,7 @@ class DatabaseManager
*/
public function createTenantConnection(Tenant $tenant, $connectionName)
{
$this->app['config']["database.connections.$connectionName"] = $tenant->database->connection();
$this->app['config']["database.connections.$connectionName"] = $tenant->database()->connection();
}
/**