public function getPhaseAttribute() { return $phase = \App\Phase::where('id', $this->id_phase)->get(); }
public function listByMethodology(Request $request) { $data = $request->all(); $id_methodology = $data['id_methodology']; $phases = \App\Phase::where('id_methodology', $id_methodology)->lists('name', 'id'); if ($request->ajax()) { return response()->json(['status' => true, 'data' => $phases]); } }