/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $data = $this->getLog(); $r = ProjectPlan::find($id)->update($data); return response()->json($data); }
protected function getPlan($id) { $data['finish'] = ProjectPlan::where('p_id', $id[0])->where('v_id', $id[1])->where('pp_log', '<>', 'null')->get(); $data['plans'] = ProjectPlan::where('p_id', $id[0])->where('v_id', $id[1])->where('pp_log', null)->get(); return $data; }