Passed
Push — master ( 1ffd02...b93f0b )
by Bertrand
06:21
created

ResetPasswordController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A showResetForm() 0 6 1
1
<?php
2
3
namespace App\Http\Controllers\Auth;
4
5
use App\Http\Controllers\Controller;
6
use App\Providers\RouteServiceProvider;
7
use Illuminate\Foundation\Auth\ResetsPasswords;
8
use Illuminate\Http\Request;
9
10
class ResetPasswordController extends Controller
11
{
12
    /*
13
    |--------------------------------------------------------------------------
14
    | Password Reset Controller
15
    |--------------------------------------------------------------------------
16
    |
17
    | This controller is responsible for handling password reset requests
18
    | and uses a simple trait to include this behavior. You're free to
19
    | explore this trait and override any methods you wish to tweak.
20
    |
21
    */
22
23
    use ResetsPasswords;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Foundation\Auth\ResetsPasswords requires the property $email which is not provided by App\Http\Controllers\Auth\ResetPasswordController.
Loading history...
24
25
    /**
26
     * Where to redirect users after resetting their password.
27
     *
28
     * @var string
29
     */
30
    protected $redirectTo = RouteServiceProvider::HOME;
31
32
    public function showResetForm(Request $request)
33
    {
34
        $token = $request->route()->parameter('token');
35
36
        return view('public.auth.passwords.reset')->with(
37
            ['token' => $token, 'email' => $request->email]
38
        );
39
    }
40
}
41