src/Controller/HomeController.php line 20
<?phpnamespace App\Controller;use App\Repository\OfferRepository;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\RequestStack;use Symfony\Component\Routing\Annotation\Route;class HomeController extends AbstractController{/*** @Route("/", name="index")*/public function index(){return $this->render('front/home.html.twig');}public function displayPromoSlider(OfferRepository $offerRepository){$offers = $offerRepository->findActivesOffers();return $this->render('front/elements/displayPromoSlider.html.twig', ['offers' => $offers,]);}/*** @Route("/c/{creator_slug}", name="creators")*/public function creators(RequestStack $requestStack, $creator_slug){$creator_slug = strtolower($creator_slug);$creators = ['guiruch', 'jesusance', 'theicollection', 'adelain', 'alexvizeo', 'zangarelli', 'steven', 'jonat', 'amoureuxdumonde', 'couchoud', 'simon', 'damien', 'buddy'];if (in_array($creator_slug, $creators)) {$session = $requestStack->getSession();$session->set('creator', $creator_slug);}return $this->redirectToRoute('index');}/*** @Route("/mentions-legales", name="mentions")*/public function mentions(){return $this->render('front/mentions.html.twig');}/*** @Route("/cgu", name="cgu")*/public function cgu(){return $this->render('front/cgu.html.twig');}/*** @Route("/faq", name="faq")*/public function faq(){return $this->render('front/faq.html.twig');}/*** @Route("/comment-ca-marche", name="howItWorks")*/public function howItWorks(){return $this->render('front/howItWorks.html.twig');}}