40 lines
1 KiB
PHP
40 lines
1 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class ReductionWon extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
use SerializesModels;
|
|
|
|
private $user, $coupon, $settings, $crmCoupon;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct($user, $coupon, $settings, $crmCoupon)
|
|
{
|
|
$this->user = $user;
|
|
$this->coupon = $coupon;
|
|
$this->settings = $settings;
|
|
$this->crmCoupon = $crmCoupon;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
return $this->subject($this->user->firstname . ", n'attendez plus pour imprimer votre bon d'achat " . $this->settings->name . " !")->view('front.basic.reduction-mail')
|
|
->with(['user' => $this->user, 'coupon' => $this->coupon, 'settings' => $this->settings, 'crmCoupon' => $this->crmCoupon]);
|
|
}
|
|
}
|