Files
zemailnator/app/Mail/TicketResponseNotification.php
2025-11-14 01:51:35 -08:00

61 lines
1.2 KiB
PHP

<?php
namespace App\Mail;
use App\Models\Ticket;
use Illuminate\Bus\Queueable;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Attachment;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class TicketResponseNotification extends Mailable
{
use Queueable, SerializesModels;
public Ticket $ticket;
public Collection $responses;
/**
* Create a new message instance.
*/
public function __construct(Ticket $ticket, Collection $responses)
{
$this->ticket = $ticket;
$this->responses = $responses;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Support Ticket Response: #'.$this->ticket->ticket_id,
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
markdown: 'emails.ticket.response',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, Attachment>
*/
public function attachments(): array
{
return [];
}
}