Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 3, 2023
1 parent e41673b commit ef4113c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion user_guide_src/source/incoming/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,15 @@ It is possible to nest groups within groups for finer organization if you need i

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

.. note:: Options passed to the outer ``group()`` (for example ``namespace`` and ``filter``) are not merged with the inner ``group()`` options.
Options array passed to the outer ``group()`` are merged with the inner
``group()`` options array. But note that if you specify the same key in the
inner ``group()`` options, the value is overwritten.

The above code runs ``myfilter:config`` for ``admin``, and only ``myfilter:region``
for ``admin/users/list``.

.. note:: Prior to v4.5.0, due to a bug, options passed to the outer ``group()``
are not merged with the inner ``group()`` options.

.. _routing-priority:

Expand Down
5 changes: 3 additions & 2 deletions user_guide_src/source/incoming/routing/026.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

$routes->group('admin', static function ($routes) {
$routes->group('users', static function ($routes) {
$routes->group('admin', ['filter' => 'myfilter:config'], static function ($routes) {
$routes->get('/', 'Admin\Admin::index');
$routes->group('users', ['filter' => 'myfilter:region'], static function ($routes) {
$routes->get('list', 'Admin\Users::list');
});
});

0 comments on commit ef4113c

Please sign in to comment.