ldc-portsalaries/app/Mail/EmployeeCreatedMail.php
2021-06-24 13:28:11 +02:00

36 lines
697 B
PHP

<?php
namespace App\Mail;
use App\Models\Employee;
use Illuminate\Mail\Mailable;
class EmployeeCreatedMail extends Mailable
{
protected $employee;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(Employee $employee)
{
$this->employee = $employee;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this
->subject(sprintf('%s : Votre compte a été crée', config('app.name')))
->view('emails.mail-created')
->text('emails.mail-created-plain')
->with('employee', $this->employee);
}
}