request->only(['pay_code'], 'post'); $val = Validate::rule(['pay_code|支付编码' => 'require|length:18']); if (!$val->check($param)) throw new ValidateException($val->getError()); return PayLogic::checkPayResult($param['pay_code']); } }