Skip to content

configuring routing annotation details #8939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ URL of a page from ``/blog`` to ``/news``? How many links would you need to
hunt down and update to make the change? If you're using Symfony's router,
the change is simple.

If you want to use the annotations, be sure that you have installed the ``annotations`` recipe :

.. code-block:: terminal

$ composer require annotations

To turn on the routing based on annotations, un-comment the following lines of your config/routes.yaml file by adding the ``#`` character :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first space should be removed and please add a line break after the first word crossing the 72th character (so it reads nicely in the editor).


.. code-block:: yaml

# config/routes.yaml
# index:
# path: /hello/{name}
# controller: 'App\Controller\DefaultController::index'

.. index::
single: Routing; Basics

Expand Down