request->only(['username', 'password'], 'post'); $val = Validate::rule(Config::get('validate_rules.login')); if (!$val->check($param)) throw new ValidateException($val->getError()); return AccountLogic::login($param); } //登出 public function logout() { return AccountLogic::logout(); } //详情 public function info() { return AccountLogic::info(); } //更改密码 public function updatePassword(){ $param = $this->request->only(['old_password', 'new_password'], 'post'); $val = Validate::rule(Config::get('validate_rules.changePassword')); if (!$val->check($param)) throw new ValidateException($val->getError()); return AccountLogic::updatePassword($param); } }