PlanSort.php 539 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Http\Requests\Admin;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class PlanSort extends FormRequest
  5. {
  6. /**
  7. * Get the validation rules that apply to the request.
  8. *
  9. * @return array
  10. */
  11. public function rules()
  12. {
  13. return [
  14. 'plan_ids' => 'required|array'
  15. ];
  16. }
  17. public function messages()
  18. {
  19. return [
  20. 'plan_ids.required' => '订阅计划ID不能为空',
  21. 'plan_ids.array' => '订阅计划ID格式有误'
  22. ];
  23. }
  24. }