title: How to use Redirect::intended in laravel?
body: <p>I want the route to bypass authentication filter after successfully login. So I use <code>Redirect::intended</code>. But it makes problem. Here is my code</p>
  
  <p>In LoginController@doLogin</p>
  
  <pre><code>if (Auth::attempt($credentials)) {   
   return Redirect::intended("home.index");
  }
  </code></pre>
  
  <p>In Routes</p>
  
  <pre><code>Route::group(array('before' =&gt; 'auth'), function() {
          Route::resource('home', 'HomeController');
          Route::get('/', 'HomeController');
  });
  </code></pre>
  
  <p>My routes
  <img src="https://i.stack.imgur.com/rR1uP.png" alt="my routes image"></p>
  
  <p>If I put the the home resource route without the <code>auth</code> filter, then it will work. (Not redirect to login route.).That code is given below</p>
  
  <pre><code>Route::resource('home', 'HomeController');
  Route::group(array('before' =&gt; 'auth'), function() {
      Route::get('/', 'HomeController');
  }); /* No Problem with this code */
  </code></pre>
  
  <p>But I want to work with <code>auth</code> filter.I'm using laravel 4.
  Please help me...</p>