Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit90e654b

Browse files
committed
Applied comments
1 parent66d60d2 commit90e654b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

‎book/routing.rst‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,16 @@ 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-
7871
..versionadded::2.2
7972
The ``path`` option was introduced in Symfony 2.2, ``pattern`` is used
8073
in older versions.
8174

8275
The path defined by the ``blog_show`` route acts like ``/blog/*`` where
8376
the wildcard is given the name ``slug``. For the URL ``/blog/my-blog-post``,
8477
the ``slug`` variable gets a value of ``my-blog-post``, which is available
85-
for you to use in your controller (keep reading).
78+
for you to use in your controller (keep reading). The ``blog_show`` is the
79+
internal name of the route, which doesn't have any meaning yet and just needs
80+
to be unique. Later, you'll use it to generate URLs.
8681

8782
The ``_controller`` parameter is a special key that tells Symfony which controller
8883
should be executed when a URL matches this route. The ``_controller`` string

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp