update vm ticket

This commit is contained in:
baodev0
2026-07-14 17:03:38 +07:00
parent f035730a44
commit 401dcc8783
24 changed files with 950 additions and 31 deletions
@@ -0,0 +1,34 @@
<?php
namespace App\Mail\Admin;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class TicketAdminNotification extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
public function __construct(
public readonly mixed $ticket,
public readonly mixed $customer,
) {}
public function build(): static
{
return $this
->subject("[ADMIN] Ticket mới #{$this->ticket->ticket_num} — {$this->customer->email}")
->view('emails.admin.ticket-notification')
->with([
'ticketNum' => $this->ticket->ticket_num,
'subject' => $this->ticket->subject,
'room' => $this->ticket->room,
'description' => strip_tags($this->ticket->description),
'customerName' => trim($this->customer->firstname . ' ' . $this->customer->lastname),
'customerEmail' => $this->customer->email,
'ticketUrl' => config('app.frontend_url') . '/tickets/' . $this->ticket->ticket_num,
]);
}
}