55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Customers;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class RegisterConfirmMail extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
use SerializesModels;
|
|
|
|
/**
|
|
* target Customer
|
|
*
|
|
* @var \App\Models\Customers
|
|
*/
|
|
private $customer;
|
|
|
|
/**
|
|
* Customer's firstname
|
|
*
|
|
* @var string
|
|
*/
|
|
private $firstname;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @param \App\Models\Customers $customer
|
|
* @param string|null $firstname
|
|
* @return void
|
|
*/
|
|
public function __construct(Customers $customer, mixed $firstname)
|
|
{
|
|
$this->firstname = $firstname;
|
|
$this->customer = $customer;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
$customer = $this->customer;
|
|
$firstname = $this->firstname;
|
|
return $this->subject("Confirmation d'inscription " . config('theme.site_name'))
|
|
->view('mails.register-ok', compact('customer', 'firstname'));
|
|
}
|
|
}
|