src/Controller/CoordonatesController.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Coordonate;
  4. use Doctrine\ORM\EntityManagerInterface;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  8. class CoordonatesController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/coordonates", name="app_coordonates")
  12.      */
  13.     public function coordonates(EntityManagerInterface $entityManager): Response
  14.     {
  15.         $coordonates $entityManager->getRepository(Coordonate::class)->findAll();
  16.         return $this->render('coordonates/show_coordonates.html.twig', [
  17.             'coordonates' => $coordonates,
  18.         ]);
  19.     }
  20.                             
  21. }