diff --git a/routing/external_resources.rst b/routing/external_resources.rst index b3246bb9d8a..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. @@ -101,6 +103,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