Skip to content

Commit 5194766

Browse files
committed
docs: update the user guide
1 parent 3b3d679 commit 5194766

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

user_guide_src/source/incoming/routing.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,25 @@ The output is like the following:
715715
| auto | home/index[/...] | \App\Controllers\Home::index | invalidchars | secureheaders toolbar |
716716
+--------+------------------+------------------------------------------+----------------+-----------------------+
717717
718-
The *Method* column shows the HTTP method that the route is listening for. ``auto`` means that the route is discovered by auto-routing, so it is not defined in **app/Config/Routes.php**.
718+
The *Method* column shows the HTTP method that the route is listening for. ``auto`` means that the route is discovered by Auto Routing (Legacy), so it is not defined in **app/Config/Routes.php**.
719719

720720
The *Route* column shows the URI path to match. The route of a defined route is expressed as a regular expression.
721721
But ``[/...]`` in the route of an auto route is indicates any number of segments.
722722

723+
When you use Auto Routing (Improved), the output is like the following:
724+
725+
.. code-block:: none
726+
727+
+-----------+-------------------------+------------------------------------------+----------------+---------------+
728+
| Method | Route | Handler | Before Filters | After Filters |
729+
+-----------+-------------------------+------------------------------------------+----------------+---------------+
730+
| CLI | ci(.*) | \CodeIgniter\CLI\CommandRunner::index/$1 | | |
731+
| GET(auto) | product/list/../..[/..] | \App\Controllers\Product::getList | | toolbar |
732+
+-----------+-------------------------+------------------------------------------+----------------+---------------+
733+
734+
The *Method* will be like ``GET(auto)``. ``/..`` in the *Route* column indicates one segment.
735+
``[/..]`` indicates it is optional.
736+
723737
.. note:: When auto-routing is enabled, if you have the route ``home``, it can be also accessd by ``Home``, or maybe by ``hOme``, ``hoMe``, ``HOME``, etc. But the command shows only ``home``.
724738

725739
.. important:: The system is not perfect. If you use Custom Placeholders, *Filters* might not be correct. But the filters defined in **app/Config/Routes.php** are always displayed correctly.

0 commit comments

Comments
 (0)