validate(); } /** * 初始化验证 * * @time 2019年11月27日 * @throws \Exception * @return mixed */ protected function validate() { if (method_exists($this, 'getValidate')) { $validate = $this->getValidate(); if (!$validate->check(request()->param())) { throw new ValidateFailedException($validate->getError()); } return true; } return true; } }