Skip to content

Commit eb2ce88

Browse files
authored
Update service_container.rst
Hi ! If I'm not mistaking, we should extending the AbstractController to add a service in a controller.
1 parent 30e02a9 commit eb2ce88

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
@@ -32,10 +32,11 @@ service's class or interface name. Want to :doc:`log </logging>` something? No p
3232
namespace App\Controller;
3333

3434
use Psr\Log\LoggerInterface;
35+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
3536
use Symfony\Component\HttpFoundation\Response;
3637
use Symfony\Component\Routing\Annotation\Route;
3738

38-
class ProductController
39+
class ProductController extends AbstractController
3940
{
4041
/**
4142
* @Route("/products")

0 commit comments

Comments
 (0)