class Count extends BaseValidate
{
protected $rule =
[
count’ => ‘isPositiveInteger| between:1,15’
];
}
访问z.cn/api/v1/product/recent?count=3 就会提示
{
“msg”: “服务器内部错误”,
“error-code”: 999,
“request_url”: “/api/v1/product/recent?count=3”
}
如果不加between 判断就可以输入最近15个商品