Passed
Push — master ( 957889...d2fe6b )
by Karel
08:00
created

ResetPasswordController::redirectTo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Chuckbe\Chuckcms\Controllers\Auth;
4
5
use Illuminate\Foundation\Auth\ResetsPasswords;
0 ignored issues
show
Bug introduced by
The type Illuminate\Foundation\Auth\ResetsPasswords 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\Bus\DispatchesJobs;
7
use Illuminate\Routing\Controller as BaseController;
8
use Illuminate\Foundation\Validation\ValidatesRequests;
9
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
10
11
class ResetPasswordController extends BaseController
12
{
13
    /*
14
    |--------------------------------------------------------------------------
15
    | Password Reset Controller
16
    |--------------------------------------------------------------------------
17
    |
18
    | This controller is responsible for handling password reset requests
19
    | and uses a simple trait to include this behavior. You're free to
20
    | explore this trait and override any methods you wish to tweak.
21
    |
22
    */
23
24
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests, ResetsPasswords;
25
26
    /**
27
     * Where to redirect users after resetting their password.
28
     *
29
     * @var string
30
     */
31
    protected $redirectTo = '/dashboard';
32
33
    protected function redirectTo() { 
34
        return '/' . Auth::user()->roles()->first()->redirect;
0 ignored issues
show
Bug introduced by
The type Chuckbe\Chuckcms\Controllers\Auth\Auth was not found. Did you mean Auth? If so, make sure to prefix the type with \.
Loading history...
35
    }
36
37
    /**
38
     * Create a new controller instance.
39
     *
40
     * @return void
41
     */
42
    public function __construct()
43
    {
44
        $this->middleware('guest');
45
    }
46
}
47