src/Controller/MainController.php line 15

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