From 9eb4bfbdc81ea23b9122b1ff32e885fb48929ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 20 Jul 2020 14:30:43 +0200 Subject: [PATCH] End tenancy before initializing again --- src/Tenancy.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Tenancy.php b/src/Tenancy.php index 03df9767..c3258505 100644 --- a/src/Tenancy.php +++ b/src/Tenancy.php @@ -29,6 +29,10 @@ class Tenancy return; } + if ($this->initialized) { + $this->end(); + } + $this->tenant = $tenant; event(new Events\InitializingTenancy($this));