ResetPassword::toMail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gamer\Notifications;
4
5
class ResetPassword extends MailNotification
6
{
7
    /**
8
     * The password reset token.
9
     *
10
     * @var string
11
     */
12
    public $token;
13
14
    /**
15
     * Create a notification instance.
16
     *
17
     * @param string $token
18
     */
19
    public function __construct($token)
20
    {
21
        $this->token = $token;
22
    }
23
24
    /**
25
     * Build the mail representation of the notification.
26
     *
27
     * @return \Illuminate\Notifications\Messages\MailMessage
28
     */
29
    public function toMail()
30
    {
31
            return $this->newMailMessage()
32
                ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
33
                ->line(trans('auth.email_reset_text'))
34
                ->action(trans('auth.reset_password'), baseUrl('password/reset/' . $this->token))
35
                ->line(trans('auth.email_reset_not_requested'));
36
    }
37
}
38