request->only(['page' => 1, 'size' => 10, 'keyword' => ''], 'post'); $val = Validate::rule(Config::get('validate_rules.common')); if (!$val->check($param)) throw new ValidateException($val->getError()); return VersionLogic::getList($param); } //创建版本 public function create() { $param = $this->request->only(['title', 'content', 'version'], 'post'); $val = Validate::rule(Config::get('validate_rules.createVersion')); if (!$val->check($param)) throw new ValidateException($val->getError()); return VersionLogic::create($param); } }