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

Skip to content

Commit 0b7f033

Browse files
committed
Make the controller extend from AbstractController
1 parent 169b305 commit 0b7f033

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

service_container.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,11 @@ inside your controller::
122122

123123
// src/Controller/ProductController.php
124124
use App\Service\MessageGenerator;
125+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
125126
use Symfony\Component\HttpFoundation\Response;
126127
use Symfony\Component\Routing\Annotation\Route;
127128

128-
class ProductController
129+
class ProductController extends AbstractController
129130
{
130131
/**
131132
* @Route("/products/new")

0 commit comments

Comments
 (0)