Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
SendResetPasswordRequestedEmail | |
0.00% |
0 / 11 |
|
0.00% |
0 / 4 |
30 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
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\Contracts\Queue\ShouldQueue; |
7 | use Illuminate\Mail\Mailable; |
8 | use Illuminate\Mail\Mailables\Content; |
9 | use Illuminate\Mail\Mailables\Envelope; |
10 | use Illuminate\Queue\SerializesModels; |
11 | |
12 | class SendResetPasswordRequestedEmail extends Mailable |
13 | { |
14 | use Queueable, SerializesModels; |
15 | |
16 | public string $url; |
17 | public string $frontendBaseUrl; |
18 | |
19 | /** |
20 | * Create a new message instance. |
21 | */ |
22 | public function __construct(public string $name, public string $admin_email, ?string $email = null, ?string $token = null) |
23 | { |
24 | $this->frontendBaseUrl = config('romeo.frontend-base-url'); |
25 | |
26 | $this->url = filled($token) |
27 | ? $this->frontendBaseUrl . '/session/change-password?email=' . $email . '&token=' .$token |
28 | : $this->frontendBaseUrl . "/settings?tab=Profile"; |
29 | } |
30 | |
31 | /** |
32 | * Get the message envelope. |
33 | */ |
34 | public function envelope(): Envelope |
35 | { |
36 | return new Envelope( |
37 | subject: 'Out with the old and in with the new', |
38 | ); |
39 | } |
40 | |
41 | /** |
42 | * Get the message content definition. |
43 | */ |
44 | public function content(): Content |
45 | { |
46 | return new Content( |
47 | view: 'mail.admin.send_reset_password_requested_email', |
48 | ); |
49 | } |
50 | |
51 | /** |
52 | * Get the attachments for the message. |
53 | * |
54 | * @return array<int, \Illuminate\Mail\Mailables\Attachment> |
55 | */ |
56 | public function attachments(): array |
57 | { |
58 | return []; |
59 | } |
60 | } |