app/Notifications/BackupNotification.php
/**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
Get the mail representation of the notification.
@param  mixed  $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
Get the mail representation of the notification . @param mixed $notifiable @return \ Illuminate \ Notifications \ Messages \ MailMessage
public function toMail($notifiable)
    {
        $filename = date('Y_m_d_His') . "_rocketnotes_backup.xlsx";
        return (new MailMessage)
            ->markdown('mail.backup', [
                'user' => $notifiable
            ])
            ->subject('Backup RocketNotes')
            ->attach(
                Excel::download(
                    new NotesExport($notifiable->notes), $filename
                )->getFile(),
                ['as' => $filename]
            );
    }
public function toMail ( $ notifiable ) { $ filename = date ( 'Y_m_d_His' ) . " _rocketnotes_backup.xlsx " ; return ( new MailMessage ) -> markdown ( 'mail.backup' , [ 'user' => $ notifiable ] ) -> subject ( 'Backup RocketNotes' ) -> attach ( Excel :: download ( new NotesExport ( $ notifiable -> notes ) , $ filename ) -> getFile ( ) , [ 'as' => $ filename ] ) ; }
Get the mail representation of the notification.
Get the mail representation of the notification .