You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
814 B
24 lines
814 B
<?php
|
|
|
|
use App\User;
|
|
use App\Outlet;
|
|
use Faker\Generator as Faker;
|
|
|
|
$factory->define(Outlet::class, function (Faker $faker) {
|
|
$mapCenterLatitude = config('leaflet.map_center_latitude');
|
|
$mapCenterLongitude = config('leaflet.map_center_longitude');
|
|
$minLatitude = $mapCenterLatitude - 0.05;
|
|
$maxLatitude = $mapCenterLatitude + 0.05;
|
|
$minLongitude = $mapCenterLongitude - 0.07;
|
|
$maxLongitude = $mapCenterLongitude + 0.07;
|
|
|
|
return [
|
|
'name' => ucwords($faker->words(2, true)),
|
|
'address' => $faker->address,
|
|
'latitude' => $faker->latitude($minLatitude, $maxLatitude),
|
|
'longitude' => $faker->longitude($minLongitude, $maxLongitude),
|
|
'creator_id' => function () {
|
|
return factory(User::class)->create()->id;
|
|
},
|
|
];
|
|
});
|