48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class WinningProof extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
use SerializesModels;
|
|
|
|
private $sticker, $ticket, $barcode, $participation, $user, $settings;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct($sticker, $ticket, $barcode, $participation, $user, $settings)
|
|
{
|
|
$this->sticker = $sticker;
|
|
$this->ticket = $ticket;
|
|
$this->barcode = $barcode;
|
|
$this->participation = $participation;
|
|
$this->user = $user;
|
|
$this->settings = $settings;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function build()
|
|
{
|
|
$participation = $this->participation;
|
|
$user = $this->user;
|
|
return $this->subject(
|
|
$this->settings->name . " : Preuves de gain de " . $this->user->lastname . " " . $this->user->firstname
|
|
)->view(
|
|
'front.basic.winning-proof-email',
|
|
compact('participation', 'user')
|
|
)->attach($this->sticker)->attach($this->ticket)->attach($this->barcode);
|
|
}
|
|
}
|