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::
687687 * Fetch via primary key because {id} is in the route.
688688 */
689689 #[Route('/product/{id}')]
690- public function showByPk(Post $post ): Response
690+ public function showByPk(Product $product ): Response
691691 {
692692 }
693693
694694 /**
695695 * Perform a findOneBy() where the slug property matches {slug}.
696696 */
697697 #[Route('/product/{slug}')]
698- public function showBySlug(Post $post ): Response
698+ public function showBySlug(Product $product ): Response
699699 {
700700 }
701701
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
21962196Generating URLs
21972197---------------
21982198
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+
22012204Generating URLs from routes allows you to not write the ``<a href="..."> ``
22022205values manually in your HTML templates. Also, if the URL of some route changes,
22032206you 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