src/Controller/ReaStudycaseController.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\CatStudycase;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Doctrine\Persistence\ManagerRegistry;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. use App\Entity\ReaStudycase;
  9. // use App\Entity\CatStudycase;
  10. class ReaStudycaseController extends AbstractController
  11. {
  12.     /**
  13.      * @Route("/rea_studycase/", name="rea_studycase")
  14.      */
  15.     public function index(ManagerRegistry $doctrine): Response
  16.     {
  17.         $em             $doctrine->getManager();
  18.         $realisations   $em->getRepository(ReaStudycase::class)->findAll();
  19.         // $categories     = $em->getRepository(CatStudycase::class)->findAll();
  20.         return $this->render('rea_studycase/index.html.twig', [
  21.             'realisations'      => $realisations,
  22.             // 'categories'        => $categories,
  23.             'controller_name' => 'StudyCaseController',
  24.         ]);
  25.     }
  26. }