ldc-gen-game-web/app/Mail/ReductionWon.php

41 lines
1 KiB
PHP
Raw Permalink Normal View History

<?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
{
2021-08-18 17:08:02 +02:00
use Queueable;
use SerializesModels;
private $user, $coupon, $settings, $crmCoupon;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($user, $coupon, $settings, $crmCoupon)
{
2021-08-18 17:08:02 +02:00
$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]);
}
}