find($input['id']); if(!$problem){ return $this->response()->error('请刷新后重试'); } if(empty($input['reply'])){ return $this->response()->error('请输入回复内容'); } $problem->status = 1; $problem->reply = $input['reply']; $problem->save(); return $this->response()->success('保存成功')->refresh(); } public function form() { $this->hidden('id')->value($this->payload['id']); $this->textarea('reply', '回复内容'); } }