2020-11-25 16:05:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
2022-08-30 13:21:07 +00:00
|
|
|
use App\Models\Ticket;
|
2020-11-25 16:05:21 +01:00
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
|
|
class NewTicket extends Mailable
|
|
|
|
|
{
|
2021-07-23 12:06:08 +02:00
|
|
|
use Queueable;
|
|
|
|
|
use SerializesModels;
|
2020-11-25 16:05:21 +01:00
|
|
|
|
2022-08-30 13:21:07 +00:00
|
|
|
/** @var \App\Models\Ticket */
|
2020-11-25 16:05:21 +01:00
|
|
|
private $ticket;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new message instance.
|
|
|
|
|
*
|
2022-08-30 13:21:07 +00:00
|
|
|
* @param \App\Models\Ticket $ticket
|
2020-11-25 16:05:21 +01:00
|
|
|
* @return void
|
|
|
|
|
*/
|
2022-08-30 13:21:07 +00:00
|
|
|
public function __construct(Ticket $ticket)
|
2020-11-25 16:05:21 +01:00
|
|
|
{
|
|
|
|
|
$this->ticket = $ticket;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Build the message.
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function build()
|
|
|
|
|
{
|
|
|
|
|
$ticket = $this->ticket;
|
2025-09-16 15:06:12 +02:00
|
|
|
return $this->subject("[Support] Nouveau ticket n° $ticket->id - $ticket->title")
|
|
|
|
|
->view('emails.new-ticket', compact('ticket'));
|
2020-11-25 16:05:21 +01:00
|
|
|
}
|
|
|
|
|
}
|