gender ?? $this->provider?->gender?->value; return [ 'id' => $this->id, 'client_id' => $this->client_id, 'provider_id' => $this->provider_id, 'provider_name' => $this->provider_name ?? $this->provider?->user?->name, 'gender' => $gender, 'gender_label' => $gender ? GenderEnum::tryFrom($gender)?->label() : null, 'provider_email' => $this->provider_email ?? $this->provider?->user?->email, 'provider_phone' => $this->provider_phone ?? $this->provider?->user?->phone, 'provider_district' => $this->provider_district ?? null, 'provider_rating' => $this->provider_rating ?? null, 'created_at' => $this->created_at?->format('Y-m-d H:i'), 'updated_at' => $this->updated_at?->format('Y-m-d H:i'), ]; } }