|
|
|
@ -6,6 +6,7 @@ use App\Models\Customer;
|
|
|
|
|
use App\Models\State;
|
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
use Faker\Factory as Faker;
|
|
|
|
|
|
|
|
|
|
class CustomerSeeder extends Seeder
|
|
|
|
|
{
|
|
|
|
@ -15,6 +16,8 @@ class CustomerSeeder extends Seeder
|
|
|
|
|
public function run(): void
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
$faker = Faker::create(config('app.faker_locale'));
|
|
|
|
|
|
|
|
|
|
Customer::factory(35)->create();
|
|
|
|
|
foreach (Customer::all() as $customer) {
|
|
|
|
|
$s = State::inRandomOrder()->first();
|
|
|
|
@ -25,7 +28,7 @@ class CustomerSeeder extends Seeder
|
|
|
|
|
'zip' => rand(12345, 54321),
|
|
|
|
|
'lat' => $c->lat,
|
|
|
|
|
'lng' => $c->lng,
|
|
|
|
|
'address' => 'some address',
|
|
|
|
|
'address' =>$faker->address,
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|