40 lines
983 B
PHP
40 lines
983 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Moments;
|
|
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, SerializesModels;
|
|
|
|
private $customer, $firstname;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct($customer, $firstname)
|
|
{
|
|
$this->firstname = $firstname;
|
|
$this->customer = $customer;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
$customer = $this->customer;
|
|
$firstname = $this->firstname;
|
|
$slugMoment = Moments::where('star_moment', 1)->first()->slug;
|
|
return $this->subject("Confirmation d'inscription au Club Le Gaulois")->view('front.mails.register-ok', compact('customer', 'firstname', 'slugMoment'));
|
|
}
|
|
}
|