$this->id, 'name' => $this->name, 'birth_place' => $this->birth_place, 'gender' => $this->gender, 'phone' => $this->phone, 'email' => $this->email, 'blood_type' => $this->blood_type, 'weight' => $this->weight, 'height' => $this->height, 'relation_with_owner' => ($this->user && $this->user->person_id == $this->id) ? 'Self' : $this->pivot->relation_with_owner ?? null, 'marital_status' => $this->marital_status, 'last_education' => $this->last_education, 'current_employment' => $this->current_employment, 'nik' => $this->nik, 'religion' => $this->religion, 'avatar_url' => $this->avatar->url ?? asset('images/default-doctor-avatar.png'), ]; } }