@@ -304,6 +304,32 @@ called if the URL contains *only* the sub-directory. Simply put a controller
304304in there that matches the name of your default controller as specified in
305305your **app/Config/Routing.php ** file.
306306
307+ ***************************************
308+ Examples of Controller/Methods and URIs
309+ ***************************************
310+
311+ In the case of a **GET ** request with the default configuration, the mapping
312+ between controller/methods and URIs is as follows:
313+
314+ ============================ ============================ =============================================
315+ Controller/Method URI Description
316+ ============================ ============================ =============================================
317+ ``Home::getIndex() `` / The default controller and the default method.
318+ ``Blog::getIndex() `` /blog The default method.
319+ ``UserProfile::getIndex() `` /user-profile The default method.
320+ ``Blog::getTags() `` /blog/tags
321+ ``Blog::getNews($id) `` /blog/news/123
322+ ``Blog\Home::getIndex() `` /blog Sub-directory ``Blog `` and the default
323+ controller and the default method. If there
324+ is ``Blog `` controller, it takes precedence.
325+ ``Blog\Tags::getIndex() `` /blog/tags Sub-directory ``Blog `` and the default
326+ method. If there is ``Blog `` controller, it
327+ takes precedence.
328+ ``Blog\News::getIndex($id) `` /blog/news/123 Sub-directory ``Blog `` and the default method
329+ fallback. If there is ``Blog `` controller, it
330+ takes precedence.
331+ ============================ ============================ =============================================
332+
307333.. _routing-auto-routing-improved-configuration-options :
308334
309335*********************
0 commit comments