12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Http\Validate\Pdd;
- use App\Http\Validate\BaseValidate;
- use Illuminate\Support\Facades\Validator;
- class PddControllerValidate extends BaseValidate
- {
-
- public function getGoodsList($data)
- {
- $validate = Validator::make($data,
- [
- "page"=>"required|integer|min:1",
- ]
- );
- if($validate->fails()){
-
- $this->setError($validate->errors()->first());
- return false;
- }
- return true;
- }
-
- public function getGoodsRecommendUrl($data)
- {
- $validate = Validator::make($data,
- [
- "goods_sign"=>"required",
- ]
- );
- if($validate->fails()){
-
- $this->setError($validate->errors()->first());
- return false;
- }
- return true;
- }
- }
|