File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -691,15 +691,15 @@ will automatically fetch them::
691
691
* Fetch via primary key because {id} is in the route.
692
692
*/
693
693
#[Route('/product/{id}')]
694
- public function showByPk(Post $post ): Response
694
+ public function showByPk(Product $product ): Response
695
695
{
696
696
}
697
697
698
698
/**
699
699
* Perform a findOneBy() where the slug property matches {slug}.
700
700
*/
701
701
#[Route('/product/{slug}')]
702
- public function showBySlug(Post $post ): Response
702
+ public function showBySlug(Product $product ): Response
703
703
{
704
704
}
705
705
Original file line number Diff line number Diff line change @@ -2234,8 +2234,11 @@ It will help you understand and hopefully fixing unexpected behavior in your app
2234
2234
Generating URLs
2235
2235
---------------
2236
2236
2237
- Routing systems are bidirectional: 1) they associate URLs with controllers (as
2238
- explained in the previous sections); 2) they generate URLs for a given route.
2237
+ Routing systems are bidirectional:
2238
+
2239
+ 1. they associate URLs with controllers (as explained in the previous sections);
2240
+ 2. they generate URLs for a given route.
2241
+
2239
2242
Generating URLs from routes allows you to not write the ``<a href="..."> ``
2240
2243
values manually in your HTML templates. Also, if the URL of some route changes,
2241
2244
you only have to update the route configuration and all links will be updated.
You can’t perform that action at this time.
0 commit comments