3 namespace Database\Factories;
5 use Illuminate\Database\Eloquent\Factories\Factory;
6 use Illuminate\Support\Str;
9 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
11 class UserFactory extends Factory
14 * Define the model's default state.
16 * @return array<string, mixed>
18 public function definition()
21 'name' => $this->faker->name(),
22 'email' => $this->faker->unique()->safeEmail(),
23 'email_verified_at' => now(),
24 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
25 'remember_token' => Str::random(10),
30 * Indicate that the model's email address should be unverified.
34 public function unverified()
36 return $this->state(function (array $attributes) {
38 'email_verified_at' => null,