From 228d6ca7884a1e921ac83c9689720a3aa8720456 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 16 May 2025 16:58:27 +0200 Subject: [PATCH] Delete redundant "should not be cloned" part from shouldBeCloned() --- src/Actions/CloneRoutesAsTenant.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Actions/CloneRoutesAsTenant.php b/src/Actions/CloneRoutesAsTenant.php index 2e5f58e8..84f16ba1 100644 --- a/src/Actions/CloneRoutesAsTenant.php +++ b/src/Actions/CloneRoutesAsTenant.php @@ -92,18 +92,12 @@ class CloneRoutesAsTenant return $this; } - // todo@rename protected function shouldBeCloned(Route $route): bool { if ($this->shouldBeCloned) { return ($this->shouldBeCloned)($route); } - if (Str::startsWith($route->getName(), PathTenantResolver::tenantRouteNamePrefix())) { - // The route already has the tenant route name prefix, so we don't need to clone it - return false; - } - return tenancy()->routeHasMiddleware($route, $this->cloneRoutesWithMiddleware); }