I'm using Laravel 9 and I want to make a faker for my users
table:
public function definition()
{
return [
'usr_first_name' => fake()->name(),
'usr_last_name' => fake()->name(),
'usr_user_name' => fake()->unique()->name(),
'usr_mobile_phone' => , // generates a unique phone number
'usr_password_hash' => Hash::make('123456'),
'usr_email_address' => $faker->unique()->safeEmail,
'email_verified_at' => now(),
'usr_is_superuser' => now(),
'usr_is_active' => 1,
'usr_str' => Str::random(10),
'remember_token' => Str::random(10),
];
}
So as you can see for the column usr_mobile_phone
, I need to add a unique mobile number which has 11th character length.
But I don't know what is the command for doing that in faker!
So if you know, please let me know, thanks in advance.