40 lines
812 B
PHP
40 lines
812 B
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class AccountCreated extends Mailable
|
|
{
|
|
use Queueable;
|
|
use SerializesModels;
|
|
|
|
/** @var object */
|
|
public $data;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*
|
|
* @param mixed $data
|
|
* @return void
|
|
*/
|
|
public function __construct(mixed $data)
|
|
{
|
|
$this->data = (object) $data;
|
|
}
|
|
|
|
/**
|
|
* Build the message.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function build(): mixed
|
|
{
|
|
return $this
|
|
->from($this->data->email, sprintf('%s %s', $this->data->lastname, $this->data->firstname))
|
|
->subject(__("Votre compte a été créé"))
|
|
->markdown('bo.mails.account-created');
|
|
}
|
|
}
|