*/ class PlatformUserFactory extends Factory { /** * The current password being used by the factory. */ protected static ?string $password; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => fake()->name(), 'email' => fake()->unique()->safeEmail(), 'password' => static::$password ??= Hash::make('password'), 'capabilities' => [], 'is_active' => true, 'last_login_at' => null, 'remember_token' => Str::random(10), ]; } }