src/Controller/CoupcoeurController.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Repository\BienRepository;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class CoupcoeurController extends AbstractController
  8. {
  9.     /**
  10.      * @Route("/coup-de-coeur", name="app_coupcoeur")
  11.      */
  12.     public function index(
  13.         BienRepository $bienRepository
  14.     ): Response
  15.     {
  16.         return $this->render('coupcoeur/index.html.twig', [
  17.             'biens' => $bienRepository->findBy(['coupCoeur' => 'OUI'], ['id' => 'DESC'])
  18.         ]);
  19.     }
  20. }