From 07de2f95db1fb41ad78eebc9b935acca966f00e7 Mon Sep 17 00:00:00 2001 From: Eduard Lupacescu Date: Tue, 11 Jul 2023 18:35:30 +0300 Subject: [PATCH] fix: forget tenant --- src/Models/Tenant.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Models/Tenant.php b/src/Models/Tenant.php index 51957cf..d894ba0 100644 --- a/src/Models/Tenant.php +++ b/src/Models/Tenant.php @@ -87,6 +87,10 @@ public function forget(): Tenantable "database.connections.{$tenantConnectionName}.database" => null, ]); + app()->forgetInstance($this->containerKey()); + + app()->forgetInstance(Tenantable::class); + DB::purge($tenantConnectionName); return $this;