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 | /** |
||
10 | * Class SendMail |
||
11 | * |
||
12 | * @package App\Mail |
||
13 | */ |
||
14 | class SendMail extends Mailable |
||
15 | { |
||
16 | use Queueable, SerializesModels; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
17 | |||
18 | /** |
||
19 | * SendMail constructor. |
||
20 | * |
||
21 | * @param $to |
||
22 | * @param string $subject |
||
23 | * @param string $blade |
||
24 | * @param array $data |
||
25 | */ |
||
26 | public function __construct($to, string $subject, string $blade, array $data) |
||
27 | { |
||
28 | $this->to($to) |
||
29 | ->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME')) |
||
30 | ->subject($subject) |
||
31 | ->view($blade) |
||
32 | ->with($data); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Build the message. |
||
37 | * |
||
38 | * @return $this |
||
39 | */ |
||
40 | public function build() |
||
41 | { |
||
42 | return $this; |
||
43 | } |
||
44 | } |
||
45 |