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(), 'restaurant_id' => $this->restaurant_id, 'web_service' => $this->web_service, 'domain_plan' => $this->domain_plan, 'hosting_only_type' => $this->hosting_only_type, 'web_name' => $this->web_name, 'web_email' => $this->web_email, 'web_phone' => $this->web_phone, 'web_notes' => $this->web_notes, 'menu_image' => $this->menu_image, 'menu_link' => $this->menu_link, 'menu_notes' => $this->menu_notes, 'qr_from_zing' => $this->qr_from_zing, 'third_party_delivery' => $this->third_party_delivery, 'rest_catering' => $this->rest_catering, 'tablet_plan' => $this->tablet_plan, 'promo_code' => $this->promo_code, 'setup_fee' => $this->setup_fee, 'addon_device' => $this->addon_device, 'marketing_service' => $this->marketing_service, 'popular_menu_items' => $this->popular_menu_items, 'have_gmb' => $this->have_gmb, 'phone_service' => $this->phone_service, 'phone_custom_content' => $this->phone_custom_content, 'additional_notes' => $this->additional_notes, 'restaurant_app_plan' => $this->restaurant_app_plan, 'app_fee' => $this->app_fee, 'addon_equipment' => $this->addon_equipment, 'premium_marketing' => $this->premium_marketing, 'catering_menu_link' => $this->catering_menu_link, 'catering_menu_image' => $this->catering_menu_image, 'stock_images' => $this->stock_images, 'images_of_food' => $this->images_of_food, 'food_image_notes' => $this->food_image_notes, 'seo_phrases' => $this->seo_phrases, 'support_checklist' => $this->support_checklist, 'rest_status' => $this->rest_status, 'support_notes' => $this->support_notes, 'review_mail_html' => $this->review_mail_html, 'review_mail_sent' => $this->review_mail_sent, 'welcome_mail_html' => $this->welcome_mail_html, 'welcome_mail_sent' => $this->welcome_mail_sent, 'account_manager_id' => $this->account_manager_id, 'assigned_user_id' => $this->assigned_user_id, 'user_id' => $this->user_id, 'user_type' => $this->user_type, '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(''), ], ]; } }