How to logout and redirect to login page using Laravel 5.4?

add In your web.php (routes)

Route::get('logout', '\App\Http\Controllers\Auth\LoginController@logout');

add In your LoginController.php

public function logout(Request $request) {
  Auth::logout();
  return redirect('/login');
}

add In your LoginController.php Also, in the top of LoginController.php, after namespace

use Auth;
use Illuminate\Http\Request;