Add LogoutController
ADD
app/Http/Controllers/LogoutController.php
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Auth;
+
+class LogoutController extends Controller {
+ public function index() {
+ Auth::logout();
+
+ return redirect()->route('login_get');
+ }
+}

MODIFY
routes/web.php
routes/web.php
@@ -19,3 +19,5 @@ Route::get('/login', 'LoginController@index')->name('login_get');
Route::post('/login', 'LoginController@store')->name('login_post');
Route::get('/dashboard', 'DashboardController@index')->name('dashboard_get');
+
+Route::get('/logout', 'LogoutController@index')->name('logout_get');

Add LogoutController