$this->faker->unique()->safeEmail(), 'username' => $this->faker->unique()->regexify('[A-Za-z0-9]{8}'), 'password' => Hash::make(config('myconfig.password_default')), 'status' => $this->faker->randomElement(UserStatus::cases()), ]; } public function active(): Factory { return $this->state(fn () => ['status' => UserStatus::ACTIVE]); } public function inactive(): Factory { return $this->state(fn () => ['status' => UserStatus::INACTIVE]); } }