Skip to content

Commit b9afd48

Browse files
committed
docs: fix incorrect description for route group filter
1 parent d6d1434 commit b9afd48

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

user_guide_src/source/incoming/routing.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,14 @@ It is possible to nest groups within groups for finer organization if you need i
584584

585585
This would handle the URL at **admin/users/list**.
586586

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
588588
``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``.
591591

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.
593595

594596
.. note:: Prior to v4.5.0, due to a bug, options passed to the outer ``group()``
595597
are not merged with the inner ``group()`` options.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
$routes->group('admin', ['filter' => 'myfilter:config'], static function ($routes) {
3+
$routes->group('admin', ['filter' => 'myfilter1:config'], static function ($routes) {
44
$routes->get('/', 'Admin\Admin::index');
55

6-
$routes->group('users', ['filter' => 'myfilter:region'], static function ($routes) {
6+
$routes->group('users', ['filter' => 'myfilter2:region'], static function ($routes) {
77
$routes->get('list', 'Admin\Users::list');
88
});
99
});

0 commit comments

Comments
 (0)