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