Skip to content

Commit 66d60d2

Browse files
fatmuemoowouterj
authored andcommitted
Update routing.rst
Added a note to provide extra guidance when naming routes
1 parent e58e39f commit 66d60d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

book/routing.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ The route is simple:
6868
6969
return $collection;
7070
71+
.. note::
72+
73+
When defining routes, the key (e.g. ``blog_show``) is meaningless.
74+
Just be sure that it's unique so no other lines override it. In most cases, a
75+
vendorname_shortbundlename_controllername_actionname pattern
76+
(e.g. ``acme_blog_show``) is appropriate.
77+
7178
.. versionadded:: 2.2
7279
The ``path`` option was introduced in Symfony 2.2, ``pattern`` is used
7380
in older versions.

0 commit comments

Comments
 (0)