payload['id'] ?? 0; $user = User::findOrFail($id); try { DB::beginTransaction(); $user->disable($input['status_remark']); DB::commit(); } catch (Throwable $th) { DB::rollBack(); report($th); return $this->response()->error('操作失败:'.$th->getMessage()); } return $this->response() ->success(__('admin.update_succeeded')) ->refresh(); } /** * Build a form here. */ public function form() { $id = $this->payload['id'] ?? 0; $this->text('status_remark')->required(); } }