MakeDirRequest.php 762 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Http\Requests\Backend\Upload;
  3. use App\Http\Requests\Request;
  4. use Illuminate\Filesystem\Filesystem;
  5. class MakeDirRequest 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. 'dir' => 'required',
  25. 'dir_name' => 'required'
  26. ];
  27. }
  28. public function messages()
  29. {
  30. return [
  31. 'dir.required' => '目录不能为空',
  32. 'dir_name.required' => '目录名不能为空',
  33. ];
  34. }
  35. }