public function show($time = "") { if (empty($time)) { $time = date("Y"); } $regions = Region::regionsArr(); $districts = District::districtsArr(); $facility_levels = FacilityLevel::facilityLevelsArr(); $count_positives = Sample::countPositives($time); $av_positivity = Sample::avPositivity($time); $count_positives_arr = Sample::countPositives2($time); $av_positivity_arr = Sample::avPositivity2($time); return view('db/show', compact("time", "regions", "districts", "facility_levels", "count_positives", "av_positivity", "count_positives_arr", "av_positivity_arr")); }
private static function regionMonthsInit() { $regions = Location\Region::regionsArr(); $months = \MyHTML::initMonths(); $ret = []; foreach ($regions as $regID => $reg) { $ret[$regID] = $months; } return $ret; }