type = $type; $this->thank = $thank; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * * @return array */ public function via($notifiable) { return ['database']; } /** * Get the array representation of the notification. * * @param mixed $notifiable * * @return array */ public function toArray($notifiable) { $appurl = config('app.url'); return [ 'title' => $this->thank->user->username.' Has Thanked You For An Uploaded Torrent', 'body' => $this->thank->user->username.' has left you a thanks on Uploaded Torrent '.$this->thank->torrent->name, 'url' => '/torrents/'.$this->thank->torrent->id, ]; } }