@@ -204,8 +204,7 @@ To fix this, add a *requirement* that the ``{page}`` wildcard can *only* match n
204
204
xsi : schemaLocation =" http://symfony.com/schema/routing
205
205
http://symfony.com/schema/routing/routing-1.0.xsd" >
206
206
207
- <route id =" blog_list" path =" /blog/{page}" >
208
- <controller >App\Controller\BlogController::list</controller >
207
+ <route id =" blog_list" path =" /blog/{page}" controller =" App\Controller\BlogController::list" >
209
208
<requirement key =" page" >\d+</requirement >
210
209
</route >
211
210
@@ -297,8 +296,7 @@ So how can you make ``blog_list`` once again match when the user visits
297
296
xsi : schemaLocation =" http://symfony.com/schema/routing
298
297
http://symfony.com/schema/routing/routing-1.0.xsd" >
299
298
300
- <route id =" blog_list" path =" /blog/{page}" >
301
- <controller >App\Controller\BlogController::list</controller >
299
+ <route id =" blog_list" path =" /blog/{page}" controller =" App\Controller\BlogController::list" >
302
300
<default key =" page" >1</default >
303
301
304
302
<requirement key =" page" >\d+</requirement >
@@ -410,9 +408,9 @@ With all of this in mind, check out this advanced example:
410
408
http://symfony.com/schema/routing/routing-1.0.xsd" >
411
409
412
410
<route id =" article_show"
413
- path =" /articles/{_locale}/{year}/{slug}.{_format}" >
411
+ path =" /articles/{_locale}/{year}/{slug}.{_format}"
412
+ controller =" App\Controller\ArticleController::show" >
414
413
415
- <controller >App\Controller\ArticleController::show</controller >
416
414
<default key =" _format" >html</default >
417
415
<requirement key =" _locale" >en|fr</requirement >
418
416
<requirement key =" _format" >html|rss</requirement >
0 commit comments