<?php
namespace App\Controller;
use App\Repository\HeadersRepository;
use App\Repository\ProductRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class HomeController extends AbstractController
{
#[Route('/', name: 'home')]
public function index(ProductRepository $productRepository, HeadersRepository $headersRepository): Response
{
$products = $productRepository->findByIsInHome(1);
$headers = $headersRepository->findAll();
return $this->render('home/index.html.twig', [
'carousel' => true, //Le caroussel ne s'affiche que sur la page d'accueil (voir base.twig)
'top_products' => $products,
'headers' => $headers
]);
}
#[Route('a-propos', name: 'about')]
public function about(): Response
{
return $this->render('home/about.html.twig');
}
#[Route('réalissations-r', name: 'realisations')]
public function realisations(): Response
{
return $this->render('home/realisations.html.twig');
}
#[Route('invectus-i', name: 'invectus')]
public function invectus(): Response
{
return $this->render('home/invectus.html.twig');
}
#[Route('yaxanal-t', name: 'yaxanal')]
public function yaxanal(): Response
{
return $this->render('home/yaxanal.html.twig');
}
#[Route('tolukeur-t', name: 'tolukeur')]
public function tolukeur(): Response
{
return $this->render('home/tolukeur.html.twig');
}
#[Route('bujuplast-b', name: 'bujuplast')]
public function bujuplast(): Response
{
return $this->render('home/bujuplast.html.twig');
}
#[Route('ascenseur-a', name: 'ascenseur')]
public function ascenseur(): Response
{
return $this->render('home/ascenseur.html.twig');
}
#[Route('feu-f', name: 'feu')]
public function feu(): Response
{
return $this->render('home/feu.html.twig');
}
#[Route('alimentation', name: 'alimentation')]
public function alimentation(): Response
{
return $this->render('home/alimentation.html.twig');
}
#[Route('blog_b', name: 'blog')]
public function blog(): Response
{
return $this->render('home/blog.html.twig');
}
#[Route('coding_b', name: 'coding')]
public function coding(): Response
{
return $this->render('home/coding.html.twig');
}
#[Route('tolu_b', name: 'tolu')]
public function tolu(): Response
{
return $this->render('home/tolu.html.twig');
}
#[Route('hack_b', name: 'hack')]
public function hack(): Response
{
return $this->render('home/hack.html.twig');
}
}