Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 440c1e3

Browse files
committed
Use PHP attribute to define the route
1 parent 17ea01c commit 440c1e3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

service_container.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ inside your controller::
126126

127127
class ProductController extends AbstractController
128128
{
129-
/**
130-
* @Route("/products/new")
131-
*/
129+
#[Route('/products/new')]
132130
public function new(MessageGenerator $messageGenerator): Response
133131
{
134132
// thanks to the type-hint, the container will instantiate a

0 commit comments

Comments
 (0)