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()); } }
时间: 2024-11-04 21:27:08