Skip to content

Commit 8c32fd0

Browse files
committed
Tweaks
1 parent 8d5cd7d commit 8c32fd0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

page_creation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Annotation Routes
8989

9090
Instead of defining your route in YAML, Symfony also allows you to use *annotation*
9191
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:
9393

9494
.. code-block:: terminal
9595
@@ -108,9 +108,9 @@ You can now add your route directly *above* the controller:
108108
109109
class LuckyController
110110
{
111-
+ /**
112-
+ * @Route("/lucky/number")
113-
+ */
111+
/**
112+
* @Route("/lucky/number")
113+
*/
114114
public function number(): Response
115115
{
116116
// this looks exactly the same
@@ -122,11 +122,11 @@ You can now add your route directly *above* the controller:
122122
// src/Controller/LuckyController.php
123123
124124
// ...
125-
+ use Symfony\Component\Routing\Annotation\Route;
125+
use Symfony\Component\Routing\Annotation\Route;
126126
127127
class LuckyController
128128
{
129-
+ #[Route('/lucky/number')]
129+
#[Route('/lucky/number')]
130130
public function number(): Response
131131
{
132132
// this looks exactly the same

0 commit comments

Comments
 (0)