<?php namespace Database\Factories; use App\Models\Customer; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Carbon; class CustomerFactory extends Factory { protected $model = Customer::class; public function definition(): array { $company_name = $this->faker->company(); $internal_name = explode(',', $company_name); $address = $this->faker->streetAddress(); $city = 'Vancouver, Canada'; return [ 'company_name' => $company_name, 'internal_name' => strtolower($internal_name[0]), 'shipping_address_line_1' => $address, 'shipping_address_line_2' => $city, 'billing_address_line_1' => $address, 'billing_address_line_2' => $city, 'phone' => $this->faker->phoneNumber(), 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), ]; } }