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(), 'appointment_created_date' => $this->appointment_created_date, 'restaurant_name' => $this->restaurant_name, 'deal_hubspot_link' => $this->deal_hubspot_link, 'comments' => $this->comments, 'lead_type' => $this->lead_type, 'sales_manager' => $this->sales_manager, 'appointment_date' => $this->appointment_date, 'meeting_confirmed' => $this->meeting_confirmed, 'contact_info_updated' => $this->contact_info_updated, 'audio_record_updated' => $this->audio_record_updated, 'deal_created_by' => $this->deal_created_by, 'csv' => $this->csv, '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(''), ], ]; } }