From 0fc2a984ed9ab75f1709039e1be7b67dc2f5159f Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Wed, 28 Sep 2022 14:54:56 +0500 Subject: [PATCH] Update src/Database/DatabaseConfig.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Samuel Ć tancl --- src/Database/DatabaseConfig.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Database/DatabaseConfig.php b/src/Database/DatabaseConfig.php index b1b4aeef..200944a7 100644 --- a/src/Database/DatabaseConfig.php +++ b/src/Database/DatabaseConfig.php @@ -205,8 +205,7 @@ class DatabaseConfig /** Get the TenantDatabaseManager for this tenant's connection. */ public function hostManager(): Contracts\TenantDatabaseManager { - // DB cache the previous connection configurations and changing the connection configuration does not work - // So we purge the previous host connection before changing it + // 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