InviteNewUsersConfigsRequest.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class InviteNewUsersConfigsRequest extends FormRequest
  5. {
  6. /**
  7. * Determine if the user is authorized to make this request.
  8. *
  9. * @return bool
  10. */
  11. public function authorize()
  12. {
  13. return true;
  14. }
  15. /**
  16. * Get the validation rules that apply to the request.
  17. *
  18. * @return array
  19. */
  20. public function rules()
  21. {
  22. return [
  23. 'name' => 'required',
  24. 'background_image' => 'required',
  25. 'condition' => 'required',
  26. 'dynamic_item' => 'required',
  27. // 'card_id' => '',
  28. // 'is_give_coupon' => 'required',
  29. // 'coupon_id' => '',
  30. // 'coupon_num' => '',
  31. // 'balance' => 'required',
  32. 'is_repeat' => 'required',
  33. 'start_time' => '',
  34. 'end_time' => '',
  35. 'status' => 'required',
  36. 'area_id' => 'required',
  37. ];
  38. }
  39. public function attributes()
  40. {
  41. return [
  42. 'name' => '活动名称',
  43. 'background_image' => '背景图',
  44. 'num' => '邀请人人数量',
  45. 'condition' => '条件',
  46. 'is_give_card' => '是否赠卡',
  47. 'card_id' => '骑行卡',
  48. 'is_give_coupon' => '是否赠券',
  49. 'coupon_id' => '优惠券',
  50. 'coupon_num' => '优惠券数量',
  51. 'balance' => '余额',
  52. 'is_repeat' => '是否可重复任务',
  53. 'start_time' => '活动开始时间',
  54. 'end_time' => '活动结束时间',
  55. 'status' => '状态',
  56. 'area_id' => '区域',
  57. ];
  58. }
  59. }