src/Controller/FrontGalleryController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Gallery;
  4. use Doctrine\Persistence\ManagerRegistry;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class FrontGalleryController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/gallery", name="app_front_gallery")
  12.      */
  13.     public function index(ManagerRegistry $doctrine): Response
  14.     {
  15.         $images $doctrine->getRepository(Gallery::class)->findAll();
  16.         return $this->render('front_gallery/index.html.twig', [
  17.             'titlePage' => 'FabiosRoadStop - Galleria',
  18.             'images' => $images
  19.         ]);
  20.     }
  21. }