<?php
namespace App\Flexy\FrontBundle\Controller;
use App\Flexy\FrontBundle\Entity\PubBanner;
use App\Flexy\FrontBundle\Repository\CategoryProductFrontRepository;
use App\Flexy\FrontBundle\Repository\MasterSliderRepository;
use App\Flexy\FrontBundle\Repository\OfferRepository;
use App\Flexy\FrontBundle\Repository\PubBannerRepository;
use App\Flexy\ShopBundle\Repository\Product\ProductRepository;
use App\Flexy\FrontBundle\Repository\ProductFrontRepository;
use App\Flexy\ShopBundle\Entity\Product\Product;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[Route('/deals')]
class DealController extends AbstractController
{
#[Route('/', name: 'index_deals')]
public function index(
OfferRepository $offerRepository,
CategoryProductFrontRepository $categoryProductFrontRepository,
ProductFrontRepository $productRepository,
): Response
{
$deals = $productRepository->findActiveDeals();
$offers = $offerRepository->findByValid();
return $this->render('@Flexy\FrontBundle/templates/deal/index.html.twig', [
'deals'=>$deals,
]);
}
}