Skip to content

Commit 3f2bd78

Browse files
committed
Generate a more unique username
1 parent 43156e8 commit 3f2bd78

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

database/Factories/UserFactory.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function definition(): array
2727
return [
2828
'external_id' => null,
2929
'uuid' => Uuid::uuid4()->toString(),
30-
'username' => $this->faker->unique()->userName,
30+
'username' => $this->faker->userName . '_' . Str::random(10),
3131
'email' => Str::random(32) . '@example.com',
3232
'name_first' => $this->faker->firstName,
3333
'name_last' => $this->faker->lastName,
@@ -45,10 +45,6 @@ public function definition(): array
4545
*/
4646
public function admin(): Factory
4747
{
48-
return $this->state(function (array $attributes) {
49-
return [
50-
'root_admin' => true,
51-
];
52-
});
48+
return $this->state(['root_admin' => true]);
5349
}
5450
}

0 commit comments

Comments
 (0)