ProjectRequest.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace App\Http\Requests\System;
  3. use App\Http\Requests\Request;
  4. use Illuminate\Validation\Rule;
  5. class ProjectRequest 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. 'domain' => 'required',
  25. 'ae_id' => 'numeric',
  26. 'business_id' => 'numeric',
  27. 'title' => 'required',
  28. 'cn_title' => 'required',
  29. 'en_title' => 'required'
  30. ];
  31. }
  32. public function attributes()
  33. {
  34. return [
  35. 'domain' => '域名',
  36. 'ae_id' => 'AE人员',
  37. 'business_id' => '行业类型',
  38. 'title' => '项目名称',
  39. 'cn_title' => '企业中文名称',
  40. 'en_title' => '企业英文名称'
  41. ];
  42. }
  43. }