all(); if ($this->actionOfQuickEditItem()) { Arr::pull($input, $this->service->primaryKey()); if ($request->filled('_editable')) { $input = Arr::only($input, explode(',', $request->input('_editable'))); } } try { $result = $this->service->update($this->getPrimaryValue($request), $input); } catch (Throwable $th) { return $this->renderExceptionResponse( tap($th, fn () => report($th)) ); } return $this->autoResponse($result, __('admin.save')); } public function getQuickEditItemPath(array $editable = ['*']) { $params = ['_action' => 'quickEditItem']; if ($editable != ['*']) { $params['_editable'] = implode(',', $editable); } return $this->getUpdatePath().'?'.http_build_query($params); } protected function renderExceptionResponse(Throwable $e) { $message = 'Server error'; if ($e instanceof ValidationException) { $message = $e->validator->errors()->first(); } elseif ($e instanceof HttpExceptionInterface) { $message = $e->getMessage(); } return $this->response()->fail($message); } }