Skip to content

Commit 93de9ac

Browse files
committed
docs: add description
1 parent 4134a84 commit 93de9ac

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

user_guide_src/source/incoming/routing.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,25 @@ The *Method* will be like ``GET(auto)``.
829829

830830
``/..`` in the *Route* column indicates one segment. ``[/..]`` indicates it is optional.
831831

832+
If you see a route starting with ``x`` like the following, it indicates an invalid
833+
route that won't be routed, but the controller has a public method for routing.
834+
835+
.. code-block:: none
836+
837+
+-----------+----------------+------+-------------------------------------+----------------+---------------+
838+
| Method | Route | Name | Handler | Before Filters | After Filters |
839+
+-----------+----------------+------+-------------------------------------+----------------+---------------+
840+
| GET(auto) | x home/foo | | \App\Controllers\Home::getFoo | <unknown> | <unknown> |
841+
+-----------+----------------+------+-------------------------------------+----------------+---------------+
842+
843+
The above example shows you have the ``\App\Controllers\Home::getFoo()`` method,
844+
but it is not routed because it is the default controller (``Home`` by default)
845+
and the default controller name must be omitted in the URI. You should delete
846+
the ``getFoo()`` method.
847+
848+
.. note:: Prior to v4.3.4, the invalid route is displayed as a normal route
849+
due to a bug.
850+
832851
Auto Routing (Legacy)
833852
---------------------
834853

0 commit comments

Comments
 (0)