title: how to completely logout in laravel 5.5 controller?
body: <p>After I logout of my laravel application, in the browser I press the button to backward (go back) and then I see the dashboard.</p>
  
  <p>I want to eliminate this "session" that laravel mantein if I go back.</p>
  
  <p>can anyone help me?</p>
  
  <p>EDIT: I have two login files, one is inside the Controllers/Auth and another is inside the Controller/. I'm sure this is not a good practice, but it's keeping my system up and running. how to solve this?</p>
  
  <p>Controllers/Auth/LoginController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Auth;
  
  use App\Http\Controllers\Controller;
  use Illuminate\Foundation\Auth\AuthenticatesUsers;
  
  use App\User;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  use Session;
  
  
  class LoginController extends Controller
  {
      /*
      |--------------------------------------------------------------------------
      | Login Controller
      |--------------------------------------------------------------------------
      |
      | This controller handles authenticating users for the application and
      | redirecting them to your home screen. The controller uses a trait
      | to conveniently provide its functionality to your applications.
      |
      */
  
      use AuthenticatesUsers;
  
      /**
       * Where to redirect users after login.
       *
       * @var string
       */
      protected $redirectTo = '/';
  
      /**
       * Create a new controller instance.
       *
       * @return void
       */
  
      private $user;
  
  }
  </code></pre>
  
  <p>my Login Controllers/LoginController.php -></p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\User;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  use Session;
  
  
  class LoginController extends Controller
  {
      private $user;
  
  
      public function logout(){
          Auth::logout();
          \Session::flash('success',"logout");
          return redirect()-&gt;route('login');
      }
  
  }
  </code></pre>
  
  <p>my DashboardController -></p>
  
  <pre><code>use App\Authorization;
  use App\BackLog;
  use App\Key;
  use App\isKeyInUse;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  use Illuminate\Support\Facades\Redirect;
  
  class DashboardController extends Controller
  {
  
      public function index() {
  
          return view('dashboard');
      }
  
  
  }
  </code></pre>
  
  <p>my web.php -></p>
  
  <pre><code>&lt;?php
  
  Route::get('/', 'LoginController@login')-&gt;name('login');
  Route::get('auth/logout', 'Auth\LoginController@logout')-&gt;name('logout');
  
  Route::get('/dashboard', 'DashboardController@index')-&gt;name('dashboard')-&gt;middleware('auth');
  Route::post('/dashboard/getKey', 'DashboardController@getKey')-&gt;name('dashboard.key')-&gt;middleware('auth');
  </code></pre>