*/ class UserFactory extends Factory { protected static ?string $password; public function definition(): array { return [ 'name' => fake()->unique()->name(), 'password' => static::$password ??= Hash::make('password'), 'remember_token' => Str::random(10), ]; } }