From f5e0959136859f5fe97e21c276891902abec225c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Va=C5=99=C3=ADlek?= <93047221+d1d3@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:10:25 +0200 Subject: [PATCH] add early exit for 'runForMultiple' method --- src/Tenancy.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Tenancy.php b/src/Tenancy.php index 30f138e3..cd75c23b 100644 --- a/src/Tenancy.php +++ b/src/Tenancy.php @@ -157,7 +157,10 @@ class Tenancy } $this->initialize($tenant); - $callback($tenant); + + if (! $callback($tenant)) { + break; + }; } if ($originalTenant) {