src/Controller/HomeController.php line 13

Open in your IDE?
  1. <?php
  2. namespace  App\Controller;
  3. use App\Repository\RealisationRepository;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. class HomeController extends AbstractController
  7. {
  8.     #[Route('/'name:"index")]
  9.     public function index(RealisationRepository $realisationRepository)
  10.     {
  11.         $realisations $realisationRepository->findAll();
  12.         return $this->render('pages/index.html.twig', [
  13.             'realisations' => $realisations
  14.         ]);
  15.     }
  16. }