Generate a more unique username
This commit is contained in:
parent
43156e8d53
commit
3f2bd78563
1 changed files with 2 additions and 6 deletions
|
@ -27,7 +27,7 @@ class UserFactory extends Factory
|
||||||
return [
|
return [
|
||||||
'external_id' => null,
|
'external_id' => null,
|
||||||
'uuid' => Uuid::uuid4()->toString(),
|
'uuid' => Uuid::uuid4()->toString(),
|
||||||
'username' => $this->faker->unique()->userName,
|
'username' => $this->faker->userName . '_' . Str::random(10),
|
||||||
'email' => Str::random(32) . '@example.com',
|
'email' => Str::random(32) . '@example.com',
|
||||||
'name_first' => $this->faker->firstName,
|
'name_first' => $this->faker->firstName,
|
||||||
'name_last' => $this->faker->lastName,
|
'name_last' => $this->faker->lastName,
|
||||||
|
@ -45,10 +45,6 @@ class UserFactory extends Factory
|
||||||
*/
|
*/
|
||||||
public function admin(): Factory
|
public function admin(): Factory
|
||||||
{
|
{
|
||||||
return $this->state(function (array $attributes) {
|
return $this->state(['root_admin' => true]);
|
||||||
return [
|
|
||||||
'root_admin' => true,
|
|
||||||
];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue