getRouteKey(); } public function title() { if ($this->title != '') { return $this->title; } if ($this->name != '') { return $this->name; } return 'None'; } public function toArray() { return [ 'id' => $this->getRouteKey(), 'title' => $this->title(), 'reporting_to' => $this->reporting_to, 'name' => $this->name, 'email' => $this->email, 'password' => $this->password, 'api_token' => $this->api_token, 'remember_token' => $this->remember_token, 'gender' => $this->gender, 'dob' => $this->dob, 'designation' => $this->designation, 'mobile' => $this->mobile, 'phone' => $this->phone, 'address' => $this->address, 'street' => $this->street, 'district' => $this->district, 'photo' => $this->photo, 'ref' => $this->ref, 'profile_for' => $this->profile_for, 'candidate_name' => $this->candidate_name, 'marital_status' => $this->marital_status, 'age' => $this->age, 'bloodgroup' => $this->bloodgroup, 'nationality' => $this->nationality, 'country_id' => $this->country_id, 'state_id' => $this->state_id, 'district_id' => $this->district_id, 'city_id' => $this->city_id, 'location' => $this->location, 'mothertongue' => $this->mothertongue, 'languages_known' => $this->languages_known, 'hobbies' => $this->hobbies, 'religion' => $this->religion, 'caste' => $this->caste, 'subcaste' => $this->subcaste, 'religious_value' => $this->religious_value, 'height' => $this->height, 'weight' => $this->weight, 'body_type' => $this->body_type, 'complexion' => $this->complexion, 'physical_status' => $this->physical_status, 'education' => $this->education, 'employment_type' => $this->employment_type, 'occupation' => $this->occupation, 'income' => $this->income, 'star' => $this->star, 'raasi' => $this->raasi, 'dosham' => $this->dosham, 'food_habits' => $this->food_habits, 'smoking' => $this->smoking, 'drinking' => $this->drinking, 'family_status' => $this->family_status, 'family_type' => $this->family_type, 'family_values' => $this->family_values, 'father_name' => $this->father_name, 'mother_name' => $this->mother_name, 'father_job' => $this->father_job, 'mother_job' => $this->mother_job, 'father_education' => $this->father_education, 'mother_education' => $this->mother_education, 'brother' => $this->brother, 'sister' => $this->sister, 'images' => $this->images, 'horoscope' => $this->horoscope, 'description' => $this->description, 'profile_status' => $this->profile_status, 'email_alert' => $this->email_alert, 'phone_setting' => $this->phone_setting, 'horoscope_setting' => $this->horoscope_setting, 'photo_setting' => $this->photo_setting, 'viwed_profiles' => $this->viwed_profiles, 'profile_visitors' => $this->profile_visitors, 'subscription' => $this->subscription, 'activated_at' => $this->activated_at, 'expires_at' => $this->expires_at, 'published' => $this->published, 'plan' => $this->plan, 'validity' => $this->validity, 'web' => $this->web, 'permissions' => $this->permissions, 'status' => $this->status, 'user_id' => $this->user_id, 'user_type' => $this->user_type, 'upload_folder' => $this->upload_folder, 'created_at' => !is_null($this->created_at) ? $this->created_at->format('Y-m-d H:i:s') : null, 'updated_at' => !is_null($this->updated_at) ? $this->updated_at->format('Y-m-d H:i:s') : null, 'meta' => [ 'exists' => $this->exists(), 'link' => $this->itemLink(), 'upload_url' => $this->getUploadURL(''), ], ]; } }