File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ Annotation Routes
89
89
90
90
Instead of defining your route in YAML, Symfony also allows you to use *annotation *
91
91
or *attribute * routes. Attributes are built-in in PHP starting from PHP 8. In earlier
92
- PHP versions you can use annotations. To do this, install the annotations package:
92
+ PHP versions you can use annotations, which require installing this package:
93
93
94
94
.. code-block :: terminal
95
95
@@ -108,9 +108,9 @@ You can now add your route directly *above* the controller:
108
108
109
109
class LuckyController
110
110
{
111
- + /**
112
- + * @Route("/lucky/number")
113
- + */
111
+ /**
112
+ * @Route("/lucky/number")
113
+ */
114
114
public function number(): Response
115
115
{
116
116
// this looks exactly the same
@@ -122,11 +122,11 @@ You can now add your route directly *above* the controller:
122
122
// src/Controller/LuckyController.php
123
123
124
124
// ...
125
- + use Symfony\Component\Routing\Annotation\Route;
125
+ use Symfony\Component\Routing\Annotation\Route;
126
126
127
127
class LuckyController
128
128
{
129
- + #[Route('/lucky/number')]
129
+ #[Route('/lucky/number')]
130
130
public function number(): Response
131
131
{
132
132
// this looks exactly the same
You can’t perform that action at this time.
0 commit comments