VueRouterFactory.php 591 B

12345678910111213141516171819
  1. <?php
  2. /* @var $factory \Illuminate\Database\Eloquent\Factory */
  3. use App\Models\VueRouter;
  4. use Faker\Generator as Faker;
  5. $factory->define(VueRouter::class, function (Faker $faker) {
  6. $icons = ['md-add', 'md-alarm', 'md-albums', 'md-body', 'md-card'];
  7. return [
  8. 'parent_id' => 0,
  9. 'order' => $faker->numberBetween(0, 100),
  10. 'title' => '菜单'.$faker->unique()->name,
  11. 'icon' => $faker->randomElement($icons),
  12. 'path' => '/'.fake_path(),
  13. 'cache' => $faker->randomElement([0, 1]),
  14. 'menu' => $faker->randomElement([0, 1]),
  15. ];
  16. });