2018-01-02 03:48:02 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Faker\Generator as Faker;
|
|
|
|
use \App\Models\Enums\NavaidType;
|
|
|
|
|
|
|
|
$factory->define(App\Models\Navdata::class, function (Faker $faker) {
|
|
|
|
return [
|
2018-01-03 01:19:11 +08:00
|
|
|
'id' => str_replace(' ', '', str_replace('.', '', $faker->unique()->text(5))),
|
2018-01-02 03:48:02 +08:00
|
|
|
'name' => $faker->unique()->text(10),
|
|
|
|
'type' => $faker->randomElement([NavaidType::VOR, NavaidType::NDB]),
|
|
|
|
'lat' => $faker->latitude,
|
|
|
|
'lon' => $faker->longitude,
|
|
|
|
'freq' => $faker->randomFloat(2, 100, 1000),
|
|
|
|
];
|
|
|
|
});
|