Skip to content

Commit fabe9d8

Browse files
committed
fix: route group filters are not merged into route filters
1 parent 955dd4c commit fabe9d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

system/Router/RouteCollection.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,12 @@ protected function create(string $verb, string $from, $to, ?array $options = nul
14561456
$to = $this->processArrayCallableSyntax($from, $to);
14571457
}
14581458

1459+
// Merge group filters.
1460+
if (isset($options['filter'])) {
1461+
$currentFilter = (array) ($this->currentOptions['filter'] ?? []);
1462+
$options['filter'] = array_merge($currentFilter, (array) $options['filter']);
1463+
}
1464+
14591465
$options = array_merge($this->currentOptions ?? [], $options ?? []);
14601466

14611467
// Route priority detect

0 commit comments

Comments
 (0)