Apply guest middleware to unprotected routes (such as /login and /register)
MODIFY
routes/web.php
routes/web.php
Route::get('/', 'IndexController@index')->name('index');
+Route::group(['middleware' => ['guest']], function () {
Route::get('/login', 'LoginController@index')->name('login');
Route::post('/login', 'LoginController@store');
@@ -12,6 +13,7 @@ Route::post('/reset_password', 'ResetPasswordController@post');
Route::get('/register', 'RegisterController@index')->name('register');
Route::post('/register', 'RegisterController@store');
+});
Route::group(['middleware' => ['auth']], function () {
Route::get('/dashboard', 'DashboardController')->name('dashboard');

Apply guest middleware to unprotected routes (such as /login and /register)