File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -62,23 +62,21 @@ so that the ``number()`` method is called when a user browses to it. This associ
6262is defined with the ``#[Route] `` attribute (in PHP, `attributes `_ are used to add
6363metadata to code):
6464
65- .. configuration-block ::
66-
67- .. code-block :: php-attributes
65+ .. code-block :: diff
6866
69- // src/Controller/LuckyController.php
67+ // src/Controller/LuckyController.php
7068
71- // ...
72- + use Symfony\Component\Routing\Annotation\Route;
69+ // ...
70+ + use Symfony\Component\Routing\Annotation\Route;
7371
74- class LuckyController
75- {
76- + #[Route('/lucky/number')]
77- public function number(): Response
78- {
79- // this looks exactly the same
80- }
81- }
72+ class LuckyController
73+ {
74+ + #[Route('/lucky/number')]
75+ public function number(): Response
76+ {
77+ // this looks exactly the same
78+ }
79+ }
8280
8381 That's it! If you are using Symfony web server, try it out by going to: http://localhost:8000/lucky/number
8482
You can’t perform that action at this time.
0 commit comments