File tree 2 files changed +12
-3
lines changed
user_guide_src/source/incoming
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -544,7 +544,15 @@ It is possible to nest groups within groups for finer organization if you need i
544
544
545
545
This would handle the URL at **admin/users/list **.
546
546
547
- .. note :: Options passed to the outer ``group()`` (for example ``namespace`` and ``filter``) are not merged with the inner ``group()`` options.
547
+ Options array passed to the outer ``group() `` are merged with the inner
548
+ ``group() `` options array. But note that if you specify the same key in the
549
+ inner ``group() `` options, the value is overwritten.
550
+
551
+ The above code runs ``myfilter:config `` for ``admin ``, and only ``myfilter:region ``
552
+ for ``admin/users/list ``.
553
+
554
+ .. note :: Prior to v4.5.0, due to a bug, options passed to the outer ``group()``
555
+ are not merged with the inner ``group() `` options.
548
556
549
557
.. _routing-priority :
550
558
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- $ routes ->group ('admin ' , static function ($ routes ) {
4
- $ routes ->group ('users ' , static function ($ routes ) {
3
+ $ routes ->group ('admin ' , ['filter ' => 'myfilter:config ' ], static function ($ routes ) {
4
+ $ routes ->get ('/ ' , 'Admin\Admin::index ' );
5
+ $ routes ->group ('users ' , ['filter ' => 'myfilter:region ' ], static function ($ routes ) {
5
6
$ routes ->get ('list ' , 'Admin\Users::list ' );
6
7
});
7
8
});
You can’t perform that action at this time.
0 commit comments