Completed
Push — master ( 58b661...a53837 )
by Francesco
09:22
created

ResetPassword::toMail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
declare(strict_types = 1);
3
4
namespace App\Notifications;
5
6
use Illuminate\Auth\Notifications\ResetPassword as OriginalResetPassword;
7
use Illuminate\Notifications\Messages\MailMessage;
8
9
class ResetPassword extends OriginalResetPassword
10
{
11
12
    /**
13
     * Build the mail representation of the notification.
14
     * This method overrides the parent's one in order to customize/localize the message.
15
     *
16
     * @param mixed $notifiable
17
     * @return \Illuminate\Notifications\Messages\MailMessage
18
     *
19
     * @see https://laravel.com/docs/5.5/passwords#password-customization
20
     */
21
    public function toMail($notifiable)
22
    {
23
        // @todo customize also e-mail header and footer (still in English)
24
        return (new MailMessage)
25
            ->line(__("You are receiving this e-mail because we received a password reset request for your account."))
26
            ->action(__("Reset password"), url(config("app.url") . route("password.reset", [$this->token], false)))
27
            ->line(__("If you did not request a password reset, no further action is required."));
28
    }
29
}
30