2020-11-13 10:40:55 +01:00
< ? 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 ;
2020-11-13 10:40:55 +01:00
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 ;
2020-11-13 10:40:55 +01:00
$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 ]);
}
}