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(), 'user_id' => $this->user_id, 'user_type' => $this->user_type, 'country_id' => $this->country_id, 'state_id' => $this->state_id, 'district_id' => $this->district_id, 'city_id' => $this->city_id, 'location_id' => $this->location_id, 'category_id' => $this->category_id, 'sort_order' => $this->sort_order, 'code' => $this->code, 'title' => $this->title, 'slug' => $this->slug, 'description' => $this->description, 'status' => $this->status, 'published' => $this->published, 'publish_status' => $this->publish_status, 'year' => $this->year, 'property_for' => $this->property_for, 'label' => $this->label, 'price' => $this->price, 'plan_name' => $this->plan_name, 'amount' => $this->amount, 'pay_frequency' => $this->pay_frequency, 'images' => $this->images, 'upload_folder' => $this->upload_folder, 'area' => $this->area, 'size_prefix' => $this->size_prefix, 'land_area_size_prefix' => $this->land_area_size_prefix, 'area_type' => $this->area_type, 'owner_type' => $this->owner_type, 'bedrooms' => $this->bedrooms, 'bathrooms' => $this->bathrooms, 'garages' => $this->garages, 'garage_size' => $this->garage_size, 'water_source' => $this->water_source, 'furnishing' => $this->furnishing, 'no_balcony' => $this->no_balcony, 'address' => $this->address, 'neighbourhood' => $this->neighbourhood, 'zip_code' => $this->zip_code, 'locality' => $this->locality, 'features' => $this->features, 'slider' => $this->slider, 'featured' => $this->featured, 'hotprop_order' => $this->hotprop_order, 'premium' => $this->premium, 'email_alert' => $this->email_alert, 'photo_count' => $this->photo_count, 'validity' => $this->validity, 'visibility' => $this->visibility, 'video_embed' => $this->video_embed, 'payment_status' => $this->payment_status, 'latitude' => $this->latitude, 'longitude' => $this->longitude, 'map_embed' => $this->map_embed, 'posting_type' => $this->posting_type, 'listing_plan' => $this->listing_plan, 'plan_visibility' => $this->plan_visibility, 'contact_mail' => $this->contact_mail, 'parking_no' => $this->parking_no, 'website' => $this->website, 'phone' => $this->phone, 'mobile' => $this->mobile, 'contact_name' => $this->contact_name, 'region' => $this->region, 'category_id1' => $this->category_id1, 'prop_age' => $this->prop_age, 'prop_status' => $this->prop_status, 'overview' => $this->overview, 'video' => $this->video, 'video_status' => $this->video_status, 'facilities' => $this->facilities, 'landmarks' => $this->landmarks, 'sellunit' => $this->sellunit, 'price_negotiable' => $this->price_negotiable, 'admin_status' => $this->admin_status, 'paid_status' => $this->paid_status, 'direct_contact' => $this->direct_contact, 'posted_date' => $this->posted_date, 'expire_date' => $this->expire_date, 'manage_type' => $this->manage_type, 'buildup_area' => $this->buildup_area, 'buildup_unit' => $this->buildup_unit, 'plot_area' => $this->plot_area, 'plot_unit' => $this->plot_unit, 'land_area' => $this->land_area, 'land_unit' => $this->land_unit, 'meta_title' => $this->meta_title, 'meta_keyword' => $this->meta_keyword, 'meta_description' => $this->meta_description, 'city1' => $this->city1, '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(''), ], ]; } }