40 lines
782 B
PHP
40 lines
782 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Ticket;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class NewTicket extends Mailable
|
|
{
|
|
use Queueable;
|
|
use SerializesModels;
|
|
|
|
/** @var \App\Models\Ticket */
|
|
private $ticket;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @param \App\Models\Ticket $ticket
|
|
* @return void
|
|
*/
|
|
public function __construct(Ticket $ticket)
|
|
{
|
|
$this->ticket = $ticket;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
$ticket = $this->ticket;
|
|
return $this->subject("[Support] Nouveau ticket n°" . $ticket->id)
|
|
->view('emails.new-ticket', compact('ticket'));
|
|
}
|
|
}
|