'video_shared', 'video_id' => $this->video->id, 'video_route_key' => $this->video->getRouteKey(), 'video_title' => $this->video->title, 'video_thumbnail' => $this->video->thumbnail, 'actor_id' => $this->sharer->id, 'actor_name' => $this->sharer->name, 'actor_avatar' => $this->sharer->avatar_url, 'message' => $this->message, ]; } public function toMail(object $notifiable): MailMessage { $isSong = $this->video->isAudioOnly() || $this->video->type === 'music'; $noun = $isSong ? 'song' : ($this->video->type === 'match' ? 'match' : 'video'); return (new MailMessage) ->subject($this->sharer->name . ' shared a ' . $noun . ' with you') ->view('emails.video-shared', [ 'video' => $this->video, 'sender' => $this->sharer, 'shareUrl' => $this->shareUrl, 'personalMessage' => $this->message, 'shareTitle' => $this->video->title, ]); } }