1 | <?php |
||
2 | |||
3 | namespace App\Mail; |
||
4 | |||
5 | use Illuminate\Bus\Queueable; |
||
6 | use Illuminate\Mail\Mailable; |
||
7 | use Illuminate\Queue\SerializesModels; |
||
8 | |||
9 | class AccountExpired extends Mailable |
||
10 | { |
||
11 | use Queueable, SerializesModels; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
12 | |||
13 | public $user; |
||
14 | |||
15 | private $siteEmail; |
||
16 | |||
17 | private $siteTitle; |
||
18 | |||
19 | /** |
||
20 | * Create a new message instance. |
||
21 | */ |
||
22 | public function __construct($user) |
||
23 | { |
||
24 | $this->user = $user; |
||
25 | $this->siteEmail = config('mail.from.address'); |
||
26 | $this->siteTitle = config('app.name'); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Build the message. |
||
31 | * |
||
32 | * |
||
33 | * @throws \Exception |
||
34 | */ |
||
35 | public function build(): static |
||
36 | { |
||
37 | return $this->from($this->siteEmail)->subject('Account expired')->view('emails.accountExpired')->with(['account' => $this->user->role->name, 'username' => $this->user->username, 'site' => $this->siteTitle]); |
||
38 | } |
||
39 | } |
||
40 |