AllotStaffRequest.php 912 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Http\Requests\Site;
  3. use App\Http\Requests\Request;
  4. use Illuminate\Validation\Rule;
  5. class AllotStaffRequest extends Request
  6. {
  7. /**
  8. * Determine if the user is authorized to make this request.
  9. *
  10. * @return bool
  11. */
  12. public function authorize()
  13. {
  14. return true;
  15. }
  16. /**
  17. * Get the validation rules that apply to the request.
  18. *
  19. * @return array
  20. */
  21. public function rules()
  22. {
  23. return [
  24. 'siteIds' => 'required|array',
  25. 'editorIds' => 'required|array',
  26. 'serverIds' => 'required|array',
  27. 'managerIds' => 'required|array'
  28. ];
  29. }
  30. public function attributes()
  31. {
  32. return [
  33. 'siteIds' => '项目',
  34. 'editorIds' => '采编人员',
  35. 'serverIds' => '服务人员',
  36. 'managerIds' => '项目经理',
  37. ];
  38. }
  39. }