File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
user_guide_src/source/incoming Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -584,12 +584,14 @@ It is possible to nest groups within groups for finer organization if you need i
584
584
585
585
This would handle the URL at **admin/users/list **.
586
586
587
- ** Filter ** option passed to the outer ``group() `` are merged with the inner
587
+ The `` filter `` option passed to the outer ``group() `` are merged with the inner
588
588
``group() `` filter option.
589
- The above code runs ``myfilter :config `` for the route ``admin ``, and ``myfilter :config ``
590
- and ``myfilter :region `` for the route ``admin/users/list ``.
589
+ The above code runs ``myfilter1 :config `` for the route ``admin ``, and ``myfilter1 :config ``
590
+ and ``myfilter2 :region `` for the route ``admin/users/list ``.
591
591
592
- Any other overlapping options passed to the inner `group() ` will overwrite their values.
592
+ .. note :: The same filter cannot be run multiple times with different arguments.
593
+
594
+ Any other overlapping options passed to the inner ``group() `` will overwrite their values.
593
595
594
596
.. note :: Prior to v4.5.0, due to a bug, options passed to the outer ``group()``
595
597
are not merged with the inner ``group() `` options.
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- $ routes ->group ('admin ' , ['filter ' => 'myfilter :config ' ], static function ($ routes ) {
3
+ $ routes ->group ('admin ' , ['filter ' => 'myfilter1 :config ' ], static function ($ routes ) {
4
4
$ routes ->get ('/ ' , 'Admin\Admin::index ' );
5
5
6
- $ routes ->group ('users ' , ['filter ' => 'myfilter :region ' ], static function ($ routes ) {
6
+ $ routes ->group ('users ' , ['filter ' => 'myfilter2 :region ' ], static function ($ routes ) {
7
7
$ routes ->get ('list ' , 'Admin\Users::list ' );
8
8
});
9
9
});
You can’t perform that action at this time.
0 commit comments