src/Controller/OxygenIcuController.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Hardy\Finder\OxygenIcu;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. #[Route(path'/oxygen-icu')]
  8. class OxygenIcuController extends AbstractController
  9. {
  10.     #[Route(path'/'name'oxygen_icu_index')]
  11.     public function index(): Response
  12.     {
  13.         return $this->render('oxygen_icu/index.html.twig', [
  14.             'beds' => (new OxygenIcu())->getAllSummary()
  15.         ]);
  16.     }
  17.     #[Route(path'/by-district'name'oxygen_icu_district')]
  18.     public function district(): Response
  19.     {
  20.         return $this->render('oxygen_icu/district.html.twig', [
  21.             'beds' => (new OxygenIcu())->getDetailsByDistrictId()
  22.         ]);
  23.     }
  24.     #[Route(path'/by-hospital'name'oxygen_icu_hospital')]
  25.     public function hospital(): Response
  26.     {
  27.         return $this->render('oxygen_icu/hospital.html.twig', [
  28.             'beds' => (new OxygenIcu())->getDetailsByHospitalId()
  29.         ]);
  30.     }
  31.     #[Route(path'/by-department'name'oxygen_icu_department')]
  32.     public function department(): Response
  33.     {
  34.         return $this->render('oxygen_icu/department.html.twig', [
  35.             'bed' => (new OxygenIcu())->getDetailsByDepartmentId()
  36.         ]);
  37.     }
  38. }