Skip to content

Commit 0d071ee

Browse files
committed
minor #18503 Fix a diff example in Page Creation article (javiereguiluz)
This PR was merged into the 6.2 branch. Discussion ---------- Fix a diff example in Page Creation article Commits ------- c343e44 Fix a diff example in Page Creation article
2 parents 48992b8 + c343e44 commit 0d071ee

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

page_creation.rst

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,21 @@ so that the ``number()`` method is called when a user browses to it. This associ
6262
is defined with the ``#[Route]`` attribute (in PHP, `attributes`_ are used to add
6363
metadata 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

0 commit comments

Comments
 (0)