From 042c11421a6eb5f770367a2c07897994b5324adf Mon Sep 17 00:00:00 2001 From: NoAvatar Date: Thu, 17 Oct 2024 05:02:42 +1000 Subject: [PATCH] Delete email from UserFactory & name is unique --- database/factories/UserFactory.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index a18e161..faedf93 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -16,18 +16,9 @@ class UserFactory extends Factory public function definition(): array { return [ - 'name' => fake()->name(), - 'email' => fake()->unique()->safeEmail(), - 'email_verified_at' => now(), + 'name' => fake()->unique()->name(), 'password' => static::$password ??= Hash::make('password'), 'remember_token' => Str::random(10), ]; } - - public function unverified(): static - { - return $this->state(fn(array $attributes) => [ - 'email_verified_at' => null, - ]); - } }