Completed
Push — master ( 953ae8...6664e0 )
by Cristian
05:42
created

ForgotPasswordController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A showLinkRequestForm() 0 6 1
1
<?php
2
3
namespace Backpack\Base\app\Http\Controllers\Auth;
4
5
use Backpack\Base\app\Http\Controllers\Controller;
6
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
7
8
class ForgotPasswordController extends Controller
9
{
10
    protected $data = []; // the information we send to the view
11
12
    /*
13
    |--------------------------------------------------------------------------
14
    | Password Reset Controller
15
    |--------------------------------------------------------------------------
16
    |
17
    | This controller is responsible for handling password reset emails and
18
    | includes a trait which assists in sending these notifications from
19
    | your application to your users. Feel free to explore this trait.
20
    |
21
    */
22
23
    use SendsPasswordResetEmails;
24
25
    /**
26
     * Create a new controller instance.
27
     *
28
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
29
     */
30
    public function __construct()
31
    {
32
        $this->middleware('guest');
33
    }
34
35
    // -------------------------------------------------------
36
    // Laravel overwrites for loading backpack views
37
    // -------------------------------------------------------
38
39
    /**
40
     * Display the form to request a password reset link.
41
     *
42
     * @return \Illuminate\Http\Response
43
     */
44
    public function showLinkRequestForm()
45
    {
46
        $this->data['title'] = trans('backpack::base.reset_password'); // set the page title
47
48
        return view('backpack::auth.passwords.email', $this->data);
49
    }
50
}
51