request->filter('trim')->only(['mobile', 'password'], 'post'); $val = Validate::rule(Config::get('validate_rules.login')); if (!$val->check($param)) return json_show(1004, $val->getError()); return AccountLogic::login($param); } //获取用户信息 public function getUserInfo() { $param = $this->request->filter('trim')->only(['token'], 'post'); $val = Validate::rule(['token|用户token' => 'require|length:40|alphaNum']); if (!$val->check($param)) return json_show(1004, $val->getError()); return AccountLogic::getUserInfo($param['token']); } }