Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
PlanChangedMail | |
0.00% |
0 / 10 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
envelope | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
content | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
attachments | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Mail; |
4 | |
5 | use Illuminate\Bus\Queueable; |
6 | use Illuminate\Mail\Mailable; |
7 | use Illuminate\Mail\Mailables\Content; |
8 | use Illuminate\Mail\Mailables\Envelope; |
9 | use Illuminate\Queue\SerializesModels; |
10 | |
11 | class PlanChangedMail extends Mailable |
12 | { |
13 | use Queueable, SerializesModels; |
14 | |
15 | public $user; |
16 | public $oldPlan; |
17 | public $newPlan; |
18 | |
19 | /** |
20 | * Create a new message instance. |
21 | */ |
22 | public function __construct($user, $oldPlan, $newPlan) |
23 | { |
24 | $this->user = $user; |
25 | $this->oldPlan = $oldPlan; |
26 | $this->newPlan = $newPlan; |
27 | } |
28 | |
29 | /** |
30 | * Get the message envelope. |
31 | */ |
32 | public function envelope(): Envelope |
33 | { |
34 | return new Envelope( |
35 | subject: 'Your Subscription Plan Has Changed', |
36 | ); |
37 | } |
38 | |
39 | /** |
40 | * Get the message content definition. |
41 | */ |
42 | public function content(): Content |
43 | { |
44 | return new Content( |
45 | view: 'emails.plan_changed', // Aqui vocĂȘ define o caminho da view |
46 | ); |
47 | } |
48 | |
49 | /** |
50 | * Get the attachments for the message. |
51 | * |
52 | * @return array<int, \Illuminate\Mail\Mailables\Attachment> |
53 | */ |
54 | public function attachments(): array |
55 | { |
56 | return []; |
57 | } |
58 | } |