SummaryRequest.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2019/5/10 0010
  6. * Time: 14:13
  7. */
  8. namespace App\Http\Requests\Report;
  9. use App\Http\Requests\Request;
  10. class SummaryRequest extends Request
  11. {
  12. /**
  13. * Determine if the user is authorized to make this request.
  14. *
  15. * @return bool
  16. */
  17. public function authorize()
  18. {
  19. return true;
  20. }
  21. /**
  22. * Get the validation rules that apply to the request.
  23. *
  24. * @return array
  25. */
  26. public function rules()
  27. {
  28. if (!$this->ajax()) {
  29. return [];
  30. }
  31. return [
  32. 'dataList' => 'nullable|array',
  33. 'remark' => 'nullable',
  34. 'fileList' => 'nullable|array',
  35. 'selectManageList'=>'nullable|array',
  36. 'selectCustomerList'=>'nullable|array',
  37. ];
  38. }
  39. public function attributes()
  40. {
  41. return [
  42. 'dataList' => '月底总结表格',
  43. 'remark' => '月度总结内容',
  44. 'fileList' => '文件',
  45. ];
  46. }
  47. }