src/Controller/HealthFacilityController.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Hardy\Finder\HealthFacility;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. #[Route(path'/health-facililties')]
  8. class HealthFacilityController extends AbstractController
  9. {
  10.     #[Route(path'/'name'health_facility_index')]
  11.     public function index() : Response
  12.     {
  13.         return $this->render('health_facility/index.html.twig', [
  14.             'facilities' => (new HealthFacility())->getAllSummary()
  15.         ]);
  16.     }
  17.     #[Route(path'/district'name'health_facility_district')]
  18.     public function district() : Response
  19.     {
  20.         return $this->render('health_facility/district.html.twig', [
  21.             'facilities' => (new HealthFacility())->getDistrictData()
  22.         ]);
  23.     }
  24.     #[Route(path'/sub-district'name'health_facility_sub_district')]
  25.     public function sub_district() : Response
  26.     {
  27.         return $this->render('health_facility/sub_district.html.twig', [
  28.             'facilities' => (new HealthFacility())->getSubDistrictData()
  29.         ]);
  30.     }
  31. }