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); }