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(), 'title' => $this->title, 'name' => $this->name, 'email' => $this->email, 'phone' => $this->phone, 'gender' => $this->gender, 'dob' => $this->dob, 'current_location' => $this->current_location, 'relocate_status' => $this->relocate_status, 'experience' => $this->experience, 'notice_period' => $this->notice_period, 'current_salary' => $this->current_salary, 'expected_salary' => $this->expected_salary, 'notice_period_buyout' => $this->notice_period_buyout, 'skills' => $this->skills, 'links' => $this->links, 'know_about_beo' => $this->know_about_beo, 'resume' => $this->resume, 'slug' => $this->slug, '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(''), ], ]; } }