Skip to content

Commit 75d14b0

Browse files
committed
Don't use App\Http\Controllers\Auth\LoginController
App\Http\Controllers\Auth\LoginController isn't present by default in Laravel 7 anymore
1 parent 559d79c commit 75d14b0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Controllers/LoginController.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,32 @@
22

33
namespace NickDeKruijk\Admin\Controllers;
44

5-
class LoginController extends \App\Http\Controllers\Auth\LoginController
5+
use App\Http\Controllers\Controller;
6+
use Illuminate\Foundation\Auth\AuthenticatesUsers;
7+
8+
class LoginController extends Controller
69
{
10+
/*
11+
|--------------------------------------------------------------------------
12+
| Login Controller
13+
|--------------------------------------------------------------------------
14+
|
15+
| This controller handles authenticating users for the application and
16+
| redirecting them to your home screen. The controller uses a trait
17+
| to conveniently provide its functionality to your applications.
18+
|
19+
*/
20+
21+
use AuthenticatesUsers;
22+
723
/**
824
* Where to redirect users after login.
925
*
1026
* Change the value from \App\Http\Controllers\Auth\LoginController to the admin.adminpath config
1127
*/
1228
public function __construct()
1329
{
30+
$this->middleware('guest')->except('logout');
1431
$this->redirectTo = '/' . config('admin.adminpath');
1532
}
1633

0 commit comments

Comments
 (0)