PaymentRequest.php 832 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Http\Requests\Site;
  3. use App\Http\Requests\Request;
  4. class PaymentRequest extends Request
  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. if ($this->method() == 'GET') {
  23. return [];
  24. }
  25. return [
  26. 'head' => 'required',
  27. 'head_pic' => 'required',
  28. 'done' => 'required',
  29. 'done_pic' => 'required',
  30. 'reach' => 'required',
  31. 'reach_pic' => 'required',
  32. 'renewal' => 'required',
  33. 'renewal_pic' => 'required',
  34. ];
  35. }
  36. }