helpers.php 288 B

123456789101112131415
  1. <?php
  2. /**
  3. * 生成假的路径, 文件路径, 地址路径
  4. *
  5. * @param int $min
  6. * @param int $max
  7. *
  8. * @return string
  9. */
  10. function fake_path($min = 2, $max = 4)
  11. {
  12. $faker = app(\Faker\Generator::class);
  13. return implode('/', $faker->words($faker->numberBetween($min, $max)));
  14. }