12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace App\Http\Validate\Cron;
- use App\Http\Validate\BaseValidate;
- use Illuminate\Support\Facades\Validator;
- class CronControllerValidate extends BaseValidate
- {
- /**
- * 美团参数校验
- * @param $data
- */
- public function meituanOrders($data)
- {
- $validate = Validator::make($data,
- [
- "order_type"=>"required|in:0,2,4,5,6,8",//0团购2酒店4外卖5话费&好货订单6闪购8优选
- "minute"=>"required"//几分钟前的订单
- ]
- );
- if($validate->fails()){
- //验证错误
- $this->setError($validate->errors()->first());
- return false;
- }
- return true;
- }
- }
|