Skip to content

Commit 63498a0

Browse files
author
Ahmed TAILOULOUTE
committed
Improve routing debug page
1 parent 861e72b commit 63498a0

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

routing/debug.rst

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ your application:
2121

2222
.. code-block:: text
2323
24-
homepage ANY /
25-
contact GET /contact
26-
contact_process POST /contact
27-
article_show ANY /articles/{_locale}/{year}/{title}.{_format}
28-
blog ANY /blog/{page}
29-
blog_show ANY /blog/{slug}
24+
------------------ -------- -------- ------ ----------------------------------------------
25+
Name Method Scheme Host Path
26+
------------------ -------- -------- ------ ----------------------------------------------
27+
homepage ANY ANY ANY /
28+
contact GET ANY ANY /contact
29+
contact_process POST ANY ANY /contact
30+
article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format}
31+
blog ANY ANY ANY /blog/{page}
32+
blog_show ANY ANY ANY /blog/{slug}
3033

3134
You can also get very specific information on a single route by including
3235
the route name after the command:
@@ -47,3 +50,19 @@ This command will print which route the URL matches.
4750
.. code-block:: text
4851
4952
Route "blog_show" matches
53+
54+
If you want to list the controller configured with each route, you can use the ``--show-controllers`` option:
55+
56+
.. code-block:: terminal
57+
58+
$ php app/console debug:router --show-controllers
59+
60+
This command will print a list of *all* the configured routes in your application
61+
with a new column *Controller* which shows the controller configred for a specific route:
62+
63+
.. code-block:: text
64+
65+
--------------- -------- -------- ------ -------------- ---------------------
66+
Name Method Scheme Host Path Controller
67+
--------------- -------- -------- ------ -------------- ---------------------
68+
blog_show ANY ANY ANY /blog/{slug} AppBundle:Blog:show

0 commit comments

Comments
 (0)