1 | <?php |
||
2 | |||
3 | namespace DansMaCulotte\MailTemplate; |
||
4 | |||
5 | use DansMaCulotte\MailTemplate\Drivers\Driver; |
||
6 | use Illuminate\Notifications\Notification; |
||
7 | |||
8 | class MailTemplateChannel |
||
9 | { |
||
10 | /** |
||
11 | * Send the given notification. |
||
12 | * |
||
13 | * @param mixed $notifiable |
||
14 | * @param Notification $notification |
||
15 | * @return void |
||
16 | */ |
||
17 | public function send($notifiable, Notification $notification) |
||
18 | { |
||
19 | $message = $notification->toMailTemplate($notifiable); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
20 | |||
21 | if ($message instanceof Driver) { |
||
22 | $message->send(); |
||
23 | } |
||
24 | } |
||
25 | } |
||
26 |