1 | <?php |
||
9 | class AuthController extends Controller |
||
10 | { |
||
11 | use AuthenticatesUsers; |
||
12 | |||
13 | /** |
||
14 | * Where to redirect users after login / registration. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $redirectPath = '/administrator'; |
||
19 | |||
20 | /** |
||
21 | * Authentication guard. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $guard = 'administrator'; |
||
26 | |||
27 | /** |
||
28 | * Administrator login view. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $loginView = 'admin::auth.login'; |
||
33 | |||
34 | /** |
||
35 | * Where to redirect users after logout. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $redirectAfterLogout = '/administrator'; |
||
40 | |||
41 | /** |
||
42 | * Username to use for login. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $username = 'username'; |
||
47 | |||
48 | /** |
||
49 | * Create a new authentication controller instance. |
||
50 | */ |
||
51 | public function __construct() |
||
55 | |||
56 | /** |
||
57 | * Show the application's login form. |
||
58 | * |
||
59 | * @return \Illuminate\Http\Response |
||
60 | */ |
||
61 | public function showLoginForm() |
||
65 | |||
66 | /** |
||
67 | * Handle event when the user was authenticated. |
||
68 | * |
||
69 | * @param \Illuminate\Http\Request $request |
||
70 | * @param \App\User $user |
||
71 | * @return \Illuminate\Http\RedirectResponse |
||
72 | */ |
||
73 | public function authenticated(Request $request, User $user) |
||
89 | |||
90 | /** |
||
91 | * Get the login username to be used by the controller. |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function username() |
||
99 | |||
100 | /** |
||
101 | * Get the needed authorization credentials from the request. |
||
102 | * |
||
103 | * @param \Illuminate\Http\Request $request |
||
104 | * @return array |
||
105 | */ |
||
106 | protected function credentials(Request $request) |
||
112 | |||
113 | /** |
||
114 | * Get auth guard. |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | protected function getGuard() |
||
122 | } |
||
123 |