2020-11-02 16:18:06 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
|
|
|
|
class CodeGenerationEnd extends Mailable
|
|
|
|
|
{
|
2021-08-18 17:08:02 +02:00
|
|
|
use Queueable;
|
|
|
|
|
use SerializesModels;
|
2020-11-02 16:18:06 +01:00
|
|
|
|
2022-01-07 19:00:30 +01:00
|
|
|
/**
|
|
|
|
|
* Number of codes generated
|
|
|
|
|
*
|
|
|
|
|
* @var integer
|
|
|
|
|
*/
|
2020-11-02 16:18:06 +01:00
|
|
|
private $quantity;
|
2022-01-07 19:00:30 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The game name
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
private $gameName;
|
|
|
|
|
|
2020-11-02 16:18:06 +01:00
|
|
|
/**
|
|
|
|
|
* Create a new message instance.
|
|
|
|
|
*
|
2022-01-07 19:00:30 +01:00
|
|
|
* @param integer $quantity
|
|
|
|
|
* @param string $gameName
|
2020-11-02 16:18:06 +01:00
|
|
|
* @return void
|
|
|
|
|
*/
|
2022-01-07 19:00:30 +01:00
|
|
|
public function __construct(int $quantity, string $gameName)
|
2021-08-18 17:08:02 +02:00
|
|
|
{
|
2020-11-02 16:18:06 +01:00
|
|
|
$this->quantity = $quantity;
|
2022-01-07 19:00:30 +01:00
|
|
|
$this->gameName = $gameName;
|
2020-11-02 16:18:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Build the message.
|
|
|
|
|
*
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function build()
|
|
|
|
|
{
|
2022-01-07 19:00:30 +01:00
|
|
|
return $this->subject('Fin de génération des codes uniques')
|
|
|
|
|
->view('bo.mails.generate-end-email')
|
|
|
|
|
->with(['quantity' => $this->quantity, 'gameName' => $this->gameName]);
|
2020-11-02 16:18:06 +01:00
|
|
|
}
|
|
|
|
|
}
|