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

Update DatabaseConfig.php

This commit is contained in:
Abrar Ahmad 2022-10-10 16:24:31 +05:00
parent b8e0a1c982
commit 8bde0a7ecb

View file

@ -203,7 +203,7 @@ class DatabaseConfig
// Laravel caches the previous PDO connection, so we purge it to be able to change the connection details
$this->purgeHostConnection(); // todo come up with a better name
// Set the host connection configuration array fetched from the tenant's config and manipulated to form a connection
// Create the tenant host connection config
$tenantHostConnectionName = $this->getTenantHostConnectionName();
config(["database.connections.{$tenantHostConnectionName}" => $this->hostConnection()]);