how can we send attached file with notification in gmail in laravel 8
public function toMail($notifiable)
{
return (new MailMessage)
->line('Please download the PDF.')
->attach(public_path($this->filename), [
'as' => 'filename.pdf',
'mime' => 'text/pdf',
]);
}