<?php
namespace App\Controller;
use Hardy\Finder\HealthFacility;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[Route(path: '/health-facililties')]
class HealthFacilityController extends AbstractController
{
#[Route(path: '/', name: 'health_facility_index')]
public function index() : Response
{
return $this->render('health_facility/index.html.twig', [
'facilities' => (new HealthFacility())->getAllSummary()
]);
}
#[Route(path: '/district', name: 'health_facility_district')]
public function district() : Response
{
return $this->render('health_facility/district.html.twig', [
'facilities' => (new HealthFacility())->getDistrictData()
]);
}
#[Route(path: '/sub-district', name: 'health_facility_sub_district')]
public function sub_district() : Response
{
return $this->render('health_facility/sub_district.html.twig', [
'facilities' => (new HealthFacility())->getSubDistrictData()
]);
}
}