Files
zemailnator/app/Mail/TicketResponseNotification.php
idevakk 3892c48ef2 feat: upgrade filament to v4 and ensure 100% test coverage
- Upgrade Filament framework from v3 to v4
   - Update all Filament resources and pages for v4 compatibility
   - Fix test suite to maintain 100% pass rate (321 tests passing)
   - Add visibility condition for ticket close action (only when not closed)
   - Update dependencies and build assets for new Filament version
   - Maintain backward compatibility while leveraging v4 improvements
2025-11-14 01:42:07 -08:00

61 lines
1.3 KiB
PHP

<?php
namespace App\Mail;
use Illuminate\Mail\Mailables\Attachment;
use App\Models\Ticket;
use App\Models\TicketResponse;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Mail\Mailable;
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 [];
}
}