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

Update DatabaseConfig.php

This commit is contained in:
Abrar Ahmad 2022-09-26 13:57:33 +05:00
parent e5e8686872
commit 8f7bb0c1a8

View file

@ -209,6 +209,7 @@ class DatabaseConfig
// So we purge the previous host connection before changing it
$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
$tenantHostConnectionName = $this->getTenantHostConnectionName();
config(["database.connections.{$tenantHostConnectionName}" => $this->hostConnection()]);