*/ final class ArtistContactFactory extends Factory { /** @return array */ public function definition(): array { return [ 'artist_id' => Artist::factory(), 'name' => fake()->name(), 'email' => fake()->safeEmail(), 'phone' => fake()->phoneNumber(), 'role' => fake()->randomElement(['tour_manager', 'agent', 'manager', 'production_manager']), 'is_primary' => false, 'receives_briefing' => false, 'receives_infosheet' => false, ]; } public function primary(): static { return $this->state(fn () => [ 'is_primary' => true, 'receives_briefing' => true, 'receives_infosheet' => true, ]); } public function tourManager(): static { return $this->state(fn () => ['role' => 'tour_manager']); } }