ResetPasswordNotification   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A toMail() 0 12 1
1
<?php
2
3
namespace Backpack\Base\app\Notifications;
4
5
use Illuminate\Auth\Notifications\ResetPassword as ResetPassword;
6
use Illuminate\Notifications\Messages\MailMessage;
7
use Illuminate\Notifications\Notification;
8
9
class ResetPasswordNotification extends ResetPassword
10
{
11
    /**
12
     * Build the mail representation of the notification.
13
     *
14
     * @return \Illuminate\Notifications\Messages\MailMessage
15
     */
16
    public function toMail($notifiable)
17
    {
18
        return (new MailMessage())
19
            ->subject(trans('backpack::base.password_reset.subject'))
20
            ->greeting(trans('backpack::base.password_reset.greeting'))
21
            ->line([
22
                trans('backpack::base.password_reset.line_1'),
23
                trans('backpack::base.password_reset.line_2'),
24
            ])
25
            ->action(trans('backpack::base.password_reset.button'), route('backpack.auth.password.reset.token', $this->token).'?email='.urlencode($notifiable->getEmailForPasswordReset()))
26
            ->line(trans('backpack::base.password_reset.notice'));
27
    }
28
}
29