<?php
namespace ParcBundle\Controller;
use App\Entity\Perruche;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Mime\Email;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Mailer\MailerInterface;
class PerrucheController extends AbstractController
{
#[Route('/perruches', name: 'parc_perruche_index')]
public function index(EntityManagerInterface $entityManager)
{
//On récupère l'objet faq par le null de la catégorie
$perruches = $entityManager->getRepository(Perruche::class)
->findByIsActive(true);
return $this->render('@parcbundle/parcbundle/perruche/index.html.twig', ['perruches' => $perruches]);
}
}