<?php
namespace App\Controller;
use App\Entity\CatStudycase;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Entity\ReaStudycase;
// use App\Entity\CatStudycase;
class ReaStudycaseController extends AbstractController
{
/**
* @Route("/rea_studycase/", name="rea_studycase")
*/
public function index(ManagerRegistry $doctrine): Response
{
$em = $doctrine->getManager();
$realisations = $em->getRepository(ReaStudycase::class)->findAll();
// $categories = $em->getRepository(CatStudycase::class)->findAll();
return $this->render('rea_studycase/index.html.twig', [
'realisations' => $realisations,
// 'categories' => $categories,
'controller_name' => 'StudyCaseController',
]);
}
}