ResetPasswordController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A showResetForm() 0 6 1
1
<?php
2
3
namespace Pratiksh\Adminetic\Http\Controllers\Auth;
4
5
use App\Http\Controllers\Controller;
0 ignored issues
show
Bug introduced by
The type App\Http\Controllers\Controller was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Foundation\Auth\ResetsPasswords;
7
use Illuminate\Http\Request;
8
use Pratiksh\Adminetic\Providers\AdmineticServiceProvider;
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;
24
25
    /**
26
     * Where to redirect users after resetting their password.
27
     *
28
     * @var string
29
     */
30
    protected $redirectTo = AdmineticServiceProvider::HOME;
31
32
    /**
33
     * Display the password reset view for the given token.
34
     *
35
     * If no token is present, display the link request form.
36
     *
37
     * @param  \Illuminate\Http\Request  $request
38
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
39
     */
40
    public function showResetForm(Request $request)
41
    {
42
        $token = $request->route()->parameter('token');
43
44
        return view('adminetic::admin.auth.passwords.reset')->with(
45
            ['token' => $token, 'email' => $request->email]
46
        );
47
    }
48
}
49