ldc-portsalaries/app/Mail/EmployeeCreatedMail.php

37 lines
697 B
PHP
Raw Permalink Normal View History

2021-05-08 06:50:19 +02:00
<?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
2021-06-24 13:28:11 +02:00
->subject(sprintf('%s : Votre compte a été crée', config('app.name')))
2021-05-08 06:50:19 +02:00
->view('emails.mail-created')
->text('emails.mail-created-plain')
->with('employee', $this->employee);
}
}