Skip to content

Commit 9c5f064

Browse files
committed
bug #8928 How to use the route in xml (valterjrdev)
This PR was merged into the 4.0 branch. Discussion ---------- How to use the route in xml According to xsd "http://symfony.com/schema/routing/routing-1.0.xsd" the <controller> tag does not exist because it is an attribute. This way above is the correct way to use Commits ------- fcccd7a How to use the route in xml
2 parents 0709b7b + fcccd7a commit 9c5f064

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

routing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ like ``/blog/my-post`` or ``/blog/all-about-symfony``:
8686
xsi:schemaLocation="http://symfony.com/schema/routing
8787
http://symfony.com/schema/routing/routing-1.0.xsd">
8888
89-
<route id="blog_list" path="/blog">
90-
<controller>App\Controller\BlogController::list</controller>
89+
<route id="blog_list" controller="App\Controller\BlogController::list" path="/blog" >
90+
<!-- settings -->
9191
</route>
9292
93-
<route id="blog_show" path="/blog/{slug}">
94-
<controller>App\Controller\BlogController::show</controller>
93+
<route id="blog_show" controller="App\Controller\BlogController::show" path="/blog/{slug}">
94+
<!-- settings -->
9595
</route>
9696
</routes>
9797

0 commit comments

Comments
 (0)