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 | * Create a new authentication controller instance. |
||
43 | */ |
||
44 | public function __construct() |
||
48 | |||
49 | /** |
||
50 | * Show the application's login form. |
||
51 | * |
||
52 | * @return \Illuminate\Http\Response |
||
53 | */ |
||
54 | public function showLoginForm() |
||
58 | |||
59 | /** |
||
60 | * Handle event when the user was authenticated. |
||
61 | * |
||
62 | * @param \Illuminate\Http\Request $request |
||
63 | * @param \App\User $user |
||
64 | * @return \Illuminate\Http\RedirectResponse |
||
65 | */ |
||
66 | public function authenticated(Request $request, User $user) |
||
82 | |||
83 | /** |
||
84 | * Get the needed authorization credentials from the request. |
||
85 | * |
||
86 | * @param \Illuminate\Http\Request $request |
||
87 | * @return array |
||
88 | */ |
||
89 | protected function credentials(Request $request) |
||
97 | |||
98 | /** |
||
99 | * Get auth guard. |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | protected function getGuard() |
||
107 | } |
||
108 |