src/Controller/BoxesController.php line 24

  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Accommodation;
  4. use App\Entity\Client;
  5. use App\Entity\Contract;
  6. use App\Entity\ContractClient;
  7. use App\Entity\Destination;
  8. use App\Repository\BoxRepository;
  9. use App\Repository\ClientRepository;
  10. use App\Repository\DestinationRepository;
  11. use App\Repository\TermRepository;
  12. use App\Service\ContractService;
  13. use App\Service\TermService;
  14. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  15. use Symfony\Component\HttpFoundation\Request;
  16. use Symfony\Component\HttpFoundation\Response;
  17. use Symfony\Component\Routing\Annotation\Route;
  18. class BoxesController extends AbstractController
  19. {
  20.     #[Route('/boxes/list'name'app_boxes')]
  21.     public function done(BoxRepository $boxRepositoryRequest $request): Response
  22.     {
  23.         $boxes $boxRepository->findBy(['active' => true], ['position' => 'ASC']);
  24.         return $this->render(
  25.             'Components/boxes.html.twig',
  26.             [
  27.                 'boxes' => $boxes
  28.             ]
  29.         );
  30.     }
  31. }