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(), 'client_id' => $this->client_id, 'type' => $this->type, 'category_id' => $this->category_id, 'subcategory_id' => $this->subcategory_id, 'title' => $this->title, 'name' => $this->name, 'email' => $this->email, 'mobile' => $this->mobile, 'images' => $this->images, 'description' => $this->description, 'condition' => $this->condition, 'slug' => $this->slug, 'view_count' => $this->view_count, 'price' => $this->price, 'country_id' => $this->country_id, 'state_id' => $this->state_id, 'district_id' => $this->district_id, 'city_id' => $this->city_id, 'video_link' => $this->video_link, 'negotiable' => $this->negotiable, 'manufacture_year' => $this->manufacture_year, 'electronics_brand_id' => $this->electronics_brand_id, 'electronics_model' => $this->electronics_model, 'electronics_warranty' => $this->electronics_warranty, 'electronics_additional_features' => $this->electronics_additional_features, 'job_gender' => $this->job_gender, 'job_salary_period' => $this->job_salary_period, 'job_salary_from' => $this->job_salary_from, 'job_salary_to' => $this->job_salary_to, 'job_position_type' => $this->job_position_type, 'job_company_name' => $this->job_company_name, 'job_benefits' => $this->job_benefits, 'job_work_experience' => $this->job_work_experience, 'job_expires_on' => $this->job_expires_on, 'job_languages_known' => $this->job_languages_known, 'job_remote_job' => $this->job_remote_job, 'job_skill_set' => $this->job_skill_set, 'job_company_size' => $this->job_company_size, 'job_listed_by' => $this->job_listed_by, 'job_cv_required' => $this->job_cv_required, 'job_nationality' => $this->job_nationality, 'resume_cv' => $this->resume_cv, 'resume_gender' => $this->resume_gender, 'resume_nationality' => $this->resume_nationality, 'resume_current_location' => $this->resume_current_location, 'resume_current_company' => $this->resume_current_company, 'resume_current_position' => $this->resume_current_position, 'resume_notice_period' => $this->resume_notice_period, 'resume_visa_status' => $this->resume_visa_status, 'resume_work_experience' => $this->resume_work_experience, 'resume_education_level' => $this->resume_education_level, 'resume_position_type' => $this->resume_position_type, 'resume_salary_expectation' => $this->resume_salary_expectation, 'motors_usage' => $this->motors_usage, 'motors_kilometers' => $this->motors_kilometers, 'motors_warranty' => $this->motors_warranty, 'motors_wheels' => $this->motors_wheels, 'motors_manufacturer' => $this->motors_manufacturer, 'motors_engine_size' => $this->motors_engine_size, 'motors_model' => $this->motors_model, 'motors_fuel_type' => $this->motors_fuel_type, 'motors_transmission' => $this->motors_transmission, 'property_for' => $this->property_for, 'property_floor_plan' => $this->property_floor_plan, 'property_amenities' => $this->property_amenities, 'property_construction_meterial' => $this->property_construction_meterial, 'property_about_builder' => $this->property_about_builder, 'property_RERA_reg_no' => $this->property_RERA_reg_no, 'property_bedrooms' => $this->property_bedrooms, 'property_bathrooms' => $this->property_bathrooms, 'property_number_doors' => $this->property_number_doors, 'property_car_parking' => $this->property_car_parking, 'property_car_parking_nos' => $this->property_car_parking_nos, 'property_furnishing' => $this->property_furnishing, 'property_construction_status' => $this->property_construction_status, 'property_listed_by' => $this->property_listed_by, 'property_total_floors' => $this->property_total_floors, 'property_floor_no' => $this->property_floor_no, 'property_plot_area' => $this->property_plot_area, 'property_length' => $this->property_length, 'property_breadth' => $this->property_breadth, '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(''), ], ]; } }