src/Controller/HomeController.php line 17
<?phpnamespace App\Controller;use App\Repository\ArticleRepository;use App\Repository\ImageOutingsRepository;use App\Repository\NewsRepository;use App\Repository\OutingRepository;use App\Repository\PorteursRepository;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;class HomeController extends AbstractController{#[Route('/', name: 'app_home')]public function index(OutingRepository $outingRepository, NewsRepository $newsRepository, ImageOutingsRepository $ImageOutingsRepository, PorteursRepository $PorteursRepository): Response{return $this->render('home/index.html.twig', ['outings' => $outingRepository->findFutureOutings(),'news' => $newsRepository->findFutureNews(),'imageOutings' => $ImageOutingsRepository->findAll(),'porteurs' => $PorteursRepository->getAllByBirthdate()]);}#[Route('/legendes/{giant}', name: 'app_legends')]public function legendIsidore($giant): Response{$giant = strtolower($giant);if ($giant === 'isidore'){return $this->render('legends/isidore.html.twig', []);}if ($giant === 'ernest'){return $this->render('legends/ernest.html.twig', []);}}// #[Route('/a_propos', name: 'app_about')]// public function about(ArticleRepository $articleRepository): Response// {// return $this->render('home/about.html.twig', [// ]);// }#[Route('/press', name: 'app_press')]public function press(ArticleRepository $articleRepository): Response{return $this->render('home/press.html.twig', ['articles' => $articleRepository->findBy([], ['createdAt' => 'DESC']),]);}}