I've got an error when trying to use doctrine.
Here is my error: Object of type Doctrine\Bundle\DoctrineBundle\Registry is not callable
And my controller:
public function index(ManagerRegistry $doctrine): Response
{
$articles = $doctrine()->getRepository(Article::class)->findAll();
return $this->render('blog/index.html.twig', [
'controller_name' => 'BlogController',
'articles' => $articles,
]);
}
Can someone help me ? thanks :)