all(), [ 'content' => 'required|string', 'type'=>'required|integer|between:1,2' ]); if ($validator->fails()) { return showJsonErr($validator->errors()->first()); } $id = FeedBack::insertGetId([ 'uid' => \Auth::id(), 'feedback_type'=>$param['type'], 'content' => $param['content'], ]); if (empty($id)) { return showJsonError('反馈失败,请重试'); } return showJsonSucc('反馈成功,感谢您的支持'); } }