src/Controller/App/HomeController.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Controller\App;
  3. use App\Repository\Administration\GalleryRepository;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class HomeController extends AbstractController
  8. {
  9.     #[Route('/'name'home_index')]
  10.     public function index(): Response
  11.     {
  12.         return $this->render('app/home/index.html.twig');
  13.     }
  14.     #[Route('/galerie'name'home_gallery')]
  15.     public function showGalery(GalleryRepository $galleryRepository): Response
  16.     {
  17.         return $this->render('app/product/galery.html.twig', [
  18.             'images' => $galleryRepository->findAllActivePhotos(),
  19.         ]);
  20.     }
  21. }