public function update(UpdateAppointmentRequest $request)
{
    try {
        $data = array_filter($request->only(['user_id','status','note']));
        $appointment = $this->appointment->findOrFail($request->input('id'));
        $result = $appointment->update($data);
        return response()->json(['created' => $result]);
    } catch(\PDOException $e) {
        return $this->internalIssues($e->getMessage());
    }
}

 

posted on 2017-01-07 12:30  jzfan  阅读(669)  评论(0编辑  收藏  举报