-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathSupportTicketReplied.php
More file actions
39 lines (33 loc) · 1.22 KB
/
SupportTicketReplied.php
File metadata and controls
39 lines (33 loc) · 1.22 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
<?php
namespace App\Notifications;
use App\Models\SupportTicket;
use App\Models\SupportTicket\Reply;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class SupportTicketReplied extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(
public SupportTicket $ticket,
public Reply $reply
) {}
/**
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['mail'];
}
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('Update on your support request: '.$this->ticket->mask)
->greeting("Hi {$notifiable->first_name},")
->line('Your support ticket **'.e($this->ticket->subject).'** has received a new reply.')
->line('Please log in to your dashboard to view the message and respond.')
->action('View Ticket', route('customer.support.tickets.show', $this->ticket))
->line('*Please do not reply to this email — responses must be submitted through the support portal.*');
}
}