mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:54:05 +00:00
phpstan
This commit is contained in:
parent
ca3dfe3ef9
commit
875d6409cb
1 changed files with 5 additions and 1 deletions
|
|
@ -129,7 +129,11 @@ class CloneRoutesAsTenant
|
|||
// Make the new route have the same middleware as the original route
|
||||
// Add the 'tenant' middleware to the new route
|
||||
// Exclude $this->cloneRoutesWithMiddleware MW from the new route (it should only be flagged as tenant)
|
||||
$middleware = collect($action->get('middleware') ?? [])
|
||||
|
||||
/** @var array $middleware */
|
||||
$middleware = $action->get('middleware') ?? [];
|
||||
|
||||
$middleware = collect($middleware)
|
||||
->merge(['tenant']) // Add 'tenant' flag
|
||||
// todo0 what if 'clone' is within some middleware group - not top level? this should be handled similarly
|
||||
// to tenancy()->routeHasMiddleware() - use the same traversal depth. only issue is that in such a case, we
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue