From 63498a08f0ba522f0d53f3b82763778e1ff7b326 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Tue, 29 Aug 2017 10:50:01 +0200 Subject: [PATCH 1/2] Improve routing debug page --- routing/debug.rst | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/routing/debug.rst b/routing/debug.rst index ad5953b7188..8107ec30621 100644 --- a/routing/debug.rst +++ b/routing/debug.rst @@ -21,12 +21,15 @@ your application: .. code-block:: text - homepage ANY / - contact GET /contact - contact_process POST /contact - article_show ANY /articles/{_locale}/{year}/{title}.{_format} - blog ANY /blog/{page} - blog_show ANY /blog/{slug} +------------------ -------- -------- ------ ---------------------------------------------- + Name Method Scheme Host Path +------------------ -------- -------- ------ ---------------------------------------------- + homepage ANY ANY ANY / + contact GET ANY ANY /contact + contact_process POST ANY ANY /contact + article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format} + blog ANY ANY ANY /blog/{page} + blog_show ANY ANY ANY /blog/{slug} You can also get very specific information on a single route by including the route name after the command: @@ -47,3 +50,19 @@ This command will print which route the URL matches. .. code-block:: text Route "blog_show" matches + +If you want to list the controller configured with each route, you can use the ``--show-controllers`` option: + +.. code-block:: terminal + + $ php app/console debug:router --show-controllers + +This command will print a list of *all* the configured routes in your application +with a new column *Controller* which shows the controller configred for a specific route: + +.. code-block:: text + + --------------- -------- -------- ------ -------------- --------------------- + Name Method Scheme Host Path Controller + --------------- -------- -------- ------ -------------- --------------------- + blog_show ANY ANY ANY /blog/{slug} AppBundle:Blog:show From 7027a41a87a8262645cfad8f5f40a950d45f37ef Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 3 Jan 2018 11:14:26 +0100 Subject: [PATCH 2/2] Fixes and simplifications --- routing/debug.rst | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/routing/debug.rst b/routing/debug.rst index 8107ec30621..8604636f97d 100644 --- a/routing/debug.rst +++ b/routing/debug.rst @@ -21,15 +21,16 @@ your application: .. code-block:: text ------------------- -------- -------- ------ ---------------------------------------------- - Name Method Scheme Host Path ------------------- -------- -------- ------ ---------------------------------------------- - homepage ANY ANY ANY / - contact GET ANY ANY /contact - contact_process POST ANY ANY /contact - article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format} - blog ANY ANY ANY /blog/{page} - blog_show ANY ANY ANY /blog/{slug} + ------------------ -------- -------- ------ ---------------------------------------------- + Name Method Scheme Host Path + ------------------ -------- -------- ------ ---------------------------------------------- + homepage ANY ANY ANY / + contact GET ANY ANY /contact + contact_process POST ANY ANY /contact + article_show ANY ANY ANY /articles/{_locale}/{year}/{title}.{_format} + blog ANY ANY ANY /blog/{page} + blog_show ANY ANY ANY /blog/{slug} + ------------------ -------- -------- ------ ---------------------------------------------- You can also get very specific information on a single route by including the route name after the command: @@ -50,19 +51,3 @@ This command will print which route the URL matches. .. code-block:: text Route "blog_show" matches - -If you want to list the controller configured with each route, you can use the ``--show-controllers`` option: - -.. code-block:: terminal - - $ php app/console debug:router --show-controllers - -This command will print a list of *all* the configured routes in your application -with a new column *Controller* which shows the controller configred for a specific route: - -.. code-block:: text - - --------------- -------- -------- ------ -------------- --------------------- - Name Method Scheme Host Path Controller - --------------- -------- -------- ------ -------------- --------------------- - blog_show ANY ANY ANY /blog/{slug} AppBundle:Blog:show