|
1
|
|
|
<?php namespace App\Http\Controllers\Backend; |
|
2
|
|
|
|
|
3
|
|
|
use App\Http\Controllers\Controller; |
|
4
|
|
|
use Illuminate\Http\Request; |
|
5
|
|
|
|
|
6
|
|
|
class AuthController extends Controller |
|
7
|
|
|
{ |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* The Guard implementation. |
|
|
|
|
|
|
11
|
|
|
* |
|
12
|
|
|
* @var Guard |
|
13
|
|
|
*/ |
|
14
|
|
|
protected $auth; |
|
15
|
|
|
|
|
16
|
|
|
protected $guard = 'hideyobackend'; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Show the application login form. |
|
20
|
|
|
* |
|
21
|
|
|
* @return \Illuminate\Http\Response |
|
22
|
|
|
*/ |
|
23
|
|
|
public function getLogin() |
|
24
|
|
|
{ |
|
25
|
|
|
return view('backend.auth.login'); |
|
|
|
|
|
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* Log the user out of the application. |
|
30
|
|
|
* |
|
31
|
|
|
* @return \Illuminate\Http\Response |
|
32
|
|
|
*/ |
|
33
|
|
|
public function getLogout() |
|
34
|
|
|
{ |
|
35
|
|
|
auth('hideyobackend')->logout(); |
|
36
|
|
|
|
|
37
|
|
|
return redirect()->intended('/admin'); |
|
|
|
|
|
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Handle a login request to the application. |
|
42
|
|
|
* |
|
43
|
|
|
* @param \Illuminate\Http\Request $request |
|
44
|
|
|
* @return \Illuminate\Http\Response |
|
45
|
|
|
*/ |
|
46
|
|
|
public function postLogin(Request $request) |
|
47
|
|
|
{ |
|
48
|
|
|
$this->validate($request, [ |
|
49
|
|
|
'email' => 'required|email', 'password' => 'required', |
|
50
|
|
|
]); |
|
51
|
|
|
|
|
52
|
|
|
$credentials = $request->only('email', 'password'); |
|
53
|
|
|
|
|
54
|
|
|
if (auth('hideyobackend')->attempt($credentials)) { |
|
55
|
|
|
return redirect()->intended('/admin'); |
|
|
|
|
|
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
flash('inlog is incorrect'); |
|
59
|
|
|
|
|
60
|
|
|
return redirect('/admin/security/login') |
|
|
|
|
|
|
61
|
|
|
->withInput($request->only('email', 'remember')); |
|
62
|
|
|
} |
|
63
|
|
|
} |
|
64
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths