Kimi chinh sua
This commit is contained in:
@@ -11,17 +11,20 @@ class CustomerFactory extends Factory
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$street = $this->faker->streetAddress();
|
||||
$ward = 'Phường ' . $this->faker->numberBetween(1, 15);
|
||||
$district = 'Quận ' . $this->faker->numberBetween(1, 12);
|
||||
$city = $this->faker->city();
|
||||
$fullAddress = "{$street}, {$ward}, {$district}, {$city}";
|
||||
|
||||
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(),
|
||||
],
|
||||
'type' => 'INDIVIDUAL',
|
||||
'permanent_address' => $fullAddress,
|
||||
'contact_address' => $fullAddress,
|
||||
'dob' => $this->faker->date(),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user