RechargeConfigurationRequest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class RechargeConfigurationRequest 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. //
  24. 'name' => 'required',
  25. 'recharge_money' => 'required',
  26. 'give_money' => 'required',
  27. 'status' => 'required',
  28. // 'discount' => 'required',
  29. 'area_id' => 'required',
  30. 'start_at' => 'required',
  31. 'end_at' => 'required'
  32. ];
  33. }
  34. public function attributes()
  35. {
  36. return [
  37. 'name' => '名称',
  38. 'recharge_money' => '充值金额',
  39. 'give_money' => '赠送金额',
  40. 'status' => '状态',
  41. // 'discount' => 'required',
  42. 'area_id' => '区域',
  43. 'start_at' => '开始时间',
  44. 'end_at' => '结束时间'
  45. ];
  46. }
  47. }