ForgotPasswordController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A broker() 0 3 1
A showLinkRequestForm() 0 3 1
1
<?php
2
3
namespace Thinktomorrow\Chief\App\Http\Controllers\Auth;
4
5
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
6
use Thinktomorrow\Chief\Admin\Authorization\ChiefPasswordBrokerResolver;
7
use Thinktomorrow\Chief\App\Http\Controllers\Controller;
8
9
class ForgotPasswordController extends Controller
10
{
11
    /*
12
    |--------------------------------------------------------------------------
13
    | Password Reset Controller
14
    |--------------------------------------------------------------------------
15
    |
16
    | This controller is responsible for handling password reset emails and
17
    | includes a trait which assists in sending these notifications from
18
    | your application to your users. Feel free to explore this trait.
19
    |
20
    */
21
22
    use SendsPasswordResetEmails;
23
24
    /**
25
     * Create a new controller instance.
26
     *
27
     * @return void
28
     */
29
    public function __construct()
30
    {
31
        $this->middleware('chief-guest');
32
    }
33
34
    /**
35
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
36
     */
37
    public function showLinkRequestForm()
38
    {
39
        return view('chief::admin.auth.passwords.email');
40
    }
41
42
    protected function broker()
43
    {
44
        return (new ChiefPasswordBrokerResolver(app()))->resolve();
45
    }
46
}
47