ServiceFeedbackRequest.php 789 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Http\Requests\Meter;
  3. use App\Http\Requests\Request;
  4. class ServiceFeedbackRequest 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. return [
  23. 'site_id' => 'required|numeric',
  24. 'service_type' => 'required|numeric',
  25. 'remark' => 'nullable',
  26. ];
  27. }
  28. public function attributes()
  29. {
  30. return [
  31. 'site_id' => '项目',
  32. 'service_type' => '选择服务',
  33. 'remark' => '备注',
  34. ];
  35. }
  36. }