"; // print_r($result); // echo ""; // exit; $this->success(__('User Center')); } public function feedback() { $user = $this->auth->getUser(); $params = $this->request->only(['type', 'content', 'images', 'phone']); // 使用验证器 $validate = new FeedbackValidate(); if (!$validate->check($params)) { $this->error($validate->getError()); } if ($user) { $params['user_id'] = $user->id; } $result = Feedback::create($params); if ($result) { $this->success('感谢您的反馈'); } } }