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(), 'profile_id' => $this->profile_id, 'marital_status' => $this->marital_status, 'min_age' => $this->min_age, 'max_age' => $this->max_age, 'country_id' => $this->country_id, 'state_id' => $this->state_id, 'district_id' => $this->district_id, 'city_id' => $this->city_id, 'mothertongue' => $this->mothertongue, 'religion' => $this->religion, 'caste' => $this->caste, 'subcaste' => $this->subcaste, 'min_height' => $this->min_height, 'max_height' => $this->max_height, 'physical_status' => $this->physical_status, 'education' => $this->education, 'employment_type' => $this->employment_type, 'occupation' => $this->occupation, 'star' => $this->star, 'raasi' => $this->raasi, 'dosham' => $this->dosham, 'food_habits' => $this->food_habits, 'smoking' => $this->smoking, 'drinking' => $this->drinking, ')' => $this->), '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(''), ], ]; } }