title: laravel 5.5 return redirect route not working
body: <p>I'm having a strange issue with my laravel app .</p>
  
  <p>I have a route defined as :</p>
  
  <p>web.php</p>
  
  <pre><code>Route::get('/', ['as' =&gt; '/', 'uses' =&gt; 'LoginsController@getLogin']);
  Route::post('/login', ['as' =&gt; 'login', 'uses' =&gt; 'LoginsController@postLogin']);
  
  Route::group(['middleware' =&gt; ['authenticate', 'roles']], function (){
      Route::get('/logout', ['as' =&gt; 'logout', 'uses' =&gt; 'LoginsController@getLogout']);
      Route::get('/dashboard','DashboardController@dashboard')-&gt;name('dashboard');
  });
  </code></pre>
  
  <p>In a controller , i'm trying to redirect to this route</p>
  
  <p>LoginController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Foundation\Auth\AuthenticatesUsers;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  
  class LoginsController extends Controller
  {
      use AuthenticatesUsers;
  
      protected $username = 'username';
      protected $redirectTo = '/';
      protected $guard = 'web';
  
      public function getLogin()
      {
          if (Auth::guard('web'))
          {
              return redirect()-&gt;route('dashboard');
          }
          return view('login');
      }
  
      public function postLogin(Request $request)
      {
          $auth = Auth::guard('web')-&gt;attempt([
              'username' =&gt; $request-&gt;username,
              'password' =&gt; $request-&gt;password,
              'active' =&gt; 1]);
          if ($auth)
          {
              return redirect()-&gt;route('dashboard');
          }
          return redirect()-&gt;route('/');
      }
  
      public function getLogout()
      {
          Auth::guard('web')-&gt;logout();
          return redirect()-&gt;route('/');
      }
  }
  </code></pre>
  
  <p>Where I am typing <a href="http://localhost:8000" rel="nofollow noreferrer">http://localhost:8000</a> in address bar of browser. I see.</p>
  
  <p><a href="https://i.stack.imgur.com/zT9d8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zT9d8.png" alt="When I am it runnig"></a></p>