29 lines
863 B
PHP
29 lines
863 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Customer;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class CustomerFactory extends Factory
|
|
{
|
|
protected $model = Customer::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'full_name' => $this->faker->name(),
|
|
'cmnd_cccd' => $this->faker->unique()->numerify('0##########'),
|
|
'phone' => $this->faker->phoneNumber(),
|
|
'email' => $this->faker->unique()->safeEmail(),
|
|
'address' => [
|
|
'street' => $this->faker->streetAddress(),
|
|
'ward' => 'Phường ' . $this->faker->numberBetween(1, 15),
|
|
'district' => 'Quận ' . $this->faker->numberBetween(1, 12),
|
|
'city' => $this->faker->city(),
|
|
],
|
|
'dob' => $this->faker->date(),
|
|
];
|
|
}
|
|
}
|