$this->id, 'vault_id' => $this->contact->vault_id, 'contact_id' => $this->contact->id, 'title' => $this->title, 'body' => $this->body, ]; return $array; } /** * Get the contact associated with the note. * * @return BelongsTo */ public function contact() { return $this->belongsTo(Contact::class); } /** * Get the author associated with the note. * * @return BelongsTo */ public function author() { return $this->belongsTo(User::class); } /** * Get the emotion associated with the note. * * @return BelongsTo */ public function emotion() { return $this->belongsTo(Emotion::class); } /** * Get the note's feed item. */ public function feedItem() { return $this->morphOne(ContactFeedItem::class, 'feedable'); } }