*/ class UserFactory 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 [ 'school_id' => fake()->numberBetween(1, 5), 'firstname' => fake()->firstName(), 'lastname' => fake()->lastName(), 'gender' => fake()->randomElement(['Male', 'Female']), 'cellphone' => fake()->numerify('##########'), 'email' => fake()->unique()->safeEmail(), 'address_street' => fake()->streetAddress(), 'city' => fake()->city(), 'state' => fake()->stateAbbr(), 'zip' => fake()->postcode(), 'accept_school_policy' => 1, 'semester' => 'Fall', 'school_year' => '2025-2026', 'password' => static::$password ??= Hash::make('password'), ]; } /** * Indicate that the model's email address should be unverified. */ public function unverified(): static { return $this->state(fn (array $attributes) => $attributes); } }