src/Controller/MainController.php line 14

  1. <?php
  2. namespace App\Controller;
  3. use App\Repository\EgdDeclarationRepository;
  4. use App\Repository\MetaRepository;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class MainController extends AbstractController
  9. {
  10.     #[Route('/'name'app_egd_declaration_index'methods: ['GET'])]
  11.     public function index(EgdDeclarationRepository $repository): Response
  12.     {
  13.         return $this->render('egd_declaration/index.html.twig', [
  14.             'declarations' => $repository->findBy([], ['id' => 'DESC']),
  15.         ]);
  16.     }
  17. }