Car-Repairs-Shop/database/factories/CustomerFactory.php
sackey e839d40a99
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Initial commit
2025-07-30 17:15:50 +00:00

35 lines
1.1 KiB
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Customer>
*/
class CustomerFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'first_name' => $this->faker->firstName(),
'last_name' => $this->faker->lastName(),
'email' => $this->faker->unique()->safeEmail(),
'phone' => $this->faker->phoneNumber(),
'secondary_phone' => $this->faker->optional(0.3)->phoneNumber(),
'address' => $this->faker->streetAddress(),
'city' => $this->faker->city(),
'state' => $this->faker->stateAbbr(),
'zip_code' => $this->faker->postcode(),
'notes' => $this->faker->optional(0.4)->paragraph(),
'status' => $this->faker->randomElement(['active', 'inactive']),
'last_service_date' => $this->faker->optional(0.7)->dateTimeBetween('-2 years', 'now'),
];
}
}