Re-enabled plaintext view for email notifications

Updated mail notifications to set the HTML and plaintext views since before
no plaintext version was being created.

Closes #1182
This commit is contained in:
Dan Brown
2018-12-16 20:44:57 +00:00
parent 651ae2f3be
commit 7f6929d716
5 changed files with 55 additions and 54 deletions

View File

@ -0,0 +1,35 @@
<?php namespace BookStack\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class MailNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* Get the notification's channels.
*
* @param mixed $notifiable
* @return array|string
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Create a new mail message.
* @return MailMessage
*/
protected function newMailMessage()
{
return (new MailMessage)->view([
'html' => 'vendor.notifications.email',
'text' => 'vendor.notifications.email-plain'
]);
}
}