]> BookStack Code Mirror - bookstack/blob - app/Notifications/MailNotification.php
5aa9b1e4a6296de1fe9557649a2d7401d877c52c
[bookstack] / app / Notifications / MailNotification.php
1 <?php namespace BookStack\Notifications;
2
3 use Illuminate\Bus\Queueable;
4 use Illuminate\Contracts\Queue\ShouldQueue;
5 use Illuminate\Notifications\Messages\MailMessage;
6 use Illuminate\Notifications\Notification;
7
8 class MailNotification extends Notification implements ShouldQueue
9 {
10     use Queueable;
11
12     /**
13      * Get the notification's channels.
14      *
15      * @param  mixed  $notifiable
16      * @return array|string
17      */
18     public function via($notifiable)
19     {
20         return ['mail'];
21     }
22
23     /**
24      * Create a new mail message.
25      * @return MailMessage
26      */
27     protected function newMailMessage()
28     {
29         return (new MailMessage)->view([
30             'html' => 'vendor.notifications.email',
31             'text' => 'vendor.notifications.email-plain'
32         ]);
33     }
34 }