I'm trying to attach a file to an email Notification, Laravel 5.8
I don't want to use the Mailable class because I have a whole system built around these. I can attachFromStorage to a Mailable class and there is a function to attach a file to an email notification.
My files are stored locally.
This works for Mailable
public function build()
{
return $this->from('[email protected]',$this->staff->full_name)
->attachFromStorage('library/code-conduct-2014.pdf')
->markdown('emails.view');
}
but if I try almost every variation I can think of, the following won't attach the same file to a mail notification (only showing the last portion of the mail notification)
->attach('storage/app/library/code-conduct-2014.pdf',[
'as' => 'code-conduct-2014.pdf',
'mime' => 'application/pdf',
]
);
Any ideas?
Thanks in advance.