mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 23:14:05 +00:00
Delete redundant "should not be cloned" part from shouldBeCloned()
This commit is contained in:
parent
e8eb38748f
commit
228d6ca788
1 changed files with 0 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue