public function allSections() { $response = array(); $infos = Section::all(); if (!empty($infos)) { foreach ($infos as $info) { $response[] = array("info_id" => $info['id'], "year" => $this->yearInfo($info['year_id'])['description'], "year_id" => $info['year_id'], "data_description" => $info['description']); } } return $response; }
public function getSections(Request $request) { $sections = Section::all(); return view('admin.wedonate.section.sections')->with('sections', $sections); }