content = $content; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { $user = Auth::user()->name; return (new MailMessage) ->subject($this->content['subject']) ->greeting($user . ' - ' . $this->content['title']) ->line($this->content['description']) ->action('Przejdź do strony', url('/')) ->line('Dziękujemy za używanie naszej aplikacji!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'message' => $this->content['name'] . ' add You to follow', ]; } }