<?php
namespace App\Controller\Receiver;
use App\Entity\Faq;
use App\Entity\Deals;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class HotelController extends AbstractController
{
protected $em;
public function __construct(EntityManagerInterface $entityManager)
{
$this->em = $entityManager;
}
public function index(): Response
{
$faq = $this->em->getRepository(Faq::class)->findBy(["statut"=>1], ["position"=>"ASC"]);
$deals = $this->em->getRepository(Deals::class)->findBy(["statut"=> 1]);
return $this->render('receiver/hotel/index.html.twig', [
'deals' => $deals,
'faq' => $faq
]);
}
}