ldc-gen-game-web/app/Mail/WinningProof.php
Jérémy Munsch eaad776829 Pass phpcs
2021-08-18 17:08:02 +02:00

44 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);
}
}