<?php
namespace App\Controller;
use App\Repository\EventRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class EvenementController extends AbstractController
{
#[Route('/evenements', name: 'event')]
public function event(EventRepository $eventRepository): Response
{
$events = $eventRepository->findAll('DESC');
return $this->render('pages/evenement.html.twig', [
'events' => $events,
]);
}
#[Route('/evenement/1', name: 'evenement1')]
public function evenement1(): Response
{
return $this->render('pages/evenement/1.html.twig', []);
}
}