src/Controller/HomeController.php line 14

  1. <?php
  2. namespace App\Controller;
  3. use App\Repository\NotificationsRepository;
  4. use App\Repository\TexteFirstPageRepository;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class HomeController extends AbstractController
  9. {
  10.     #[Route('/'name'home')]
  11.     public function index(): Response
  12.     {
  13.         return $this->redirectToRoute('custom_product');
  14.     }
  15.     #[Route('/cgv'name'cgv')]
  16.     public function cgv(TexteFirstPageRepository $tfprNotificationsRepository $notificationRepo): Response
  17.     {
  18.         return $this->render('vitrine/cgv.html.twig', [
  19.             'content' => $tfpr->find(2),
  20.             'notifications' => $notificationRepo->getNotifications($this->getUser()),
  21.         ]);
  22.     }
  23. }