Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 8 |
| NewPassword | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 8 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| build | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 6 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\Mail\Mail; |
| 4 | |
| 5 | use App\PasswordReset; |
| 6 | use Illuminate\Bus\Queueable; |
| 7 | use Illuminate\Mail\Mailable; |
| 8 | use Illuminate\Queue\SerializesModels; |
| 9 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 10 | |
| 11 | class NewPassword extends Mailable |
| 12 | { |
| 13 | use Queueable, SerializesModels; |
| 14 | |
| 15 | protected $passwordReset; |
| 16 | |
| 17 | /** |
| 18 | * Create a new message instance. |
| 19 | * |
| 20 | * @return void |
| 21 | */ |
| 22 | public function __construct(PasswordReset $passwordReset) |
| 23 | { |
| 24 | $this->passwordReset = $passwordReset; |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Build the message. |
| 29 | * |
| 30 | * @return $this |
| 31 | */ |
| 32 | public function build() |
| 33 | { |
| 34 | $url = env('APP_FRONT_URL') . '/auth/new-password/' . $this->passwordReset->email . '/' . $this->passwordReset->token; |
| 35 | return $this->view('emails::new_password') |
| 36 | ->text('emails::new_password_plain') |
| 37 | ->subject(env('APP_NAME') . ': Generate new password.') |
| 38 | ->with([ |
| 39 | 'url' => $url |
| 40 | ]); |
| 41 | } |
| 42 | } |