-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathBackOfficeOrderPaid.php
More file actions
49 lines (43 loc) · 1.14 KB
/
BackOfficeOrderPaid.php
File metadata and controls
49 lines (43 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace DuncanMcClean\SimpleCommerce\Notifications;
use DuncanMcClean\SimpleCommerce\Contracts\Order;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class BackOfficeOrderPaid extends Notification
{
use Queueable;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct(protected Order $order) {}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [
'mail',
];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->subject(__(':siteName: New Order', ['siteName' => config('app.name')]))
->markdown('simple-commerce::emails.backoffice_order_paid', [
'order' => $this->order,
'site' => $this->order->site(),
]);
}
}