laravel notification attach file

Solutions on MaxInterview for laravel notification attach file by the best coders in the world

showing results for - "laravel notification attach file"
Matteo
11 Jun 2017
1/**
2     * Get the mail representation of the notification.
3     *
4     * @param  mixed  $notifiable
5     * @return \Illuminate\Notifications\Messages\MailMessage
6     */
7    public function toMail($notifiable)
8    {
9        return (new MailMessage)
10                    ->line('Please download the PDF.')
11                    ->attach(public_path($this->filename), [
12                        'as' => 'filename.pdf',
13                        'mime' => 'text/pdf',
14                    ]);
15    }