public function viewPeople() { $sum_cost = $this->getTotalCost(); $total_members = $this->getTotalMember(); $people = People::get()->toArray(); return view('people', compact('people'))->with('sum_cost', $sum_cost)->with('total_members', $total_members); }