Skip to content

Commit 7b2d5d0

Browse files
Ahmed TAILOULOUTEjaviereguiluz
Ahmed TAILOULOUTE
authored andcommitted
Improve routing debug page
1 parent f7a371f commit 7b2d5d0

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
@@ -18,12 +18,15 @@ your application:
1818

1919
.. code-block:: text
2020
21-
homepage ANY /
22-
contact GET /contact
23-
contact_process POST /contact
24-
article_show ANY /articles/{_locale}/{year}/{title}.{_format}
25-
blog ANY /blog/{page}
26-
blog_show ANY /blog/{slug}
21+
------------------ -------- -------- ------ ----------------------------------------------
22+
Name Method Scheme Host Path
23+
------------------ -------- -------- ------ ----------------------------------------------
24+
homepage ANY ANY ANY /
25+
contact GET ANY ANY /contact
26+
contact_process POST ANY ANY /contact
27+
article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format}
28+
blog ANY ANY ANY /blog/{page}
29+
blog_show ANY ANY ANY /blog/{slug}
2730

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

0 commit comments

Comments
 (0)