From ebb78ce0b55dfaefbebe231c32766bd8e1df683a Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 11 Feb 2018 13:16:16 +0100 Subject: [PATCH 1/2] Improved a routing example to show annotations --- routing/external_resources.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/routing/external_resources.rst b/routing/external_resources.rst index b3246bb9d8a..6b4fd9f6560 100644 --- a/routing/external_resources.rst +++ b/routing/external_resources.rst @@ -101,6 +101,18 @@ suppose you want to prefix all routes in the AppBundle with ``/site`` (e.g. .. configuration-block:: + .. code-block:: php-annotations + + use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; + + /** + * @Route("/site") + */ + class DefaultController + { + // ... + } + .. code-block:: yaml # app/config/routing.yml From f9ce3977d7fac4a1696be7564aff001a745a8dbf Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 11 Feb 2018 13:17:38 +0100 Subject: [PATCH 2/2] Updated the section title --- routing/external_resources.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/routing/external_resources.rst b/routing/external_resources.rst index 6b4fd9f6560..4c070d776d4 100644 --- a/routing/external_resources.rst +++ b/routing/external_resources.rst @@ -92,8 +92,10 @@ in that directory are parsed and put into the routing. return $collection; -Prefixing Imported Routes -~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _prefixing-imported-routes: + +Prefixing the URLs of Imported Routes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also choose to provide a "prefix" for the imported routes. For example, suppose you want to prefix all routes in the AppBundle with ``/site`` (e.g.