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 @@ -687,15 +687,15 @@ will automatically fetch them::
687
687
* Fetch via primary key because {id} is in the route.
688
688
*/
689
689
#[Route('/product/{id}')]
690
- public function showByPk(Post $post ): Response
690
+ public function showByPk(Product $product ): Response
691
691
{
692
692
}
693
693
694
694
/**
695
695
* Perform a findOneBy() where the slug property matches {slug}.
696
696
*/
697
697
#[Route('/product/{slug}')]
698
- public function showBySlug(Post $post ): Response
698
+ public function showBySlug(Product $product ): Response
699
699
{
700
700
}
701
701
Original file line number Diff line number Diff line change @@ -2196,8 +2196,11 @@ It will help you understand and hopefully fixing unexpected behavior in your app
2196
2196
Generating URLs
2197
2197
---------------
2198
2198
2199
- Routing systems are bidirectional: 1) they associate URLs with controllers (as
2200
- explained in the previous sections); 2) they generate URLs for a given route.
2199
+ Routing systems are bidirectional:
2200
+
2201
+ 1. they associate URLs with controllers (as explained in the previous sections);
2202
+ 2. they generate URLs for a given route.
2203
+
2201
2204
Generating URLs from routes allows you to not write the ``<a href="..."> ``
2202
2205
values manually in your HTML templates. Also, if the URL of some route changes,
2203
2206
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