title: Laravel back()->withInput(); not working
body: <p>I am currently following a video tutorial on a login form. Here's the code used in case Auth::attempt() fails:</p>
  
  <pre><code>return back()-&gt;withInput();
  </code></pre>
  
  <p>This should return the user to the form and fill out the inputs again (email, password). However the fields stay empty, while login is working correctly.</p>
  
  <p>How can I fix this?</p>
  
  <p>This is my form:</p>
  
  <pre><code>{!! Form::open(array('route' =&gt; 'handleLogin')) !!}
          &lt;div class="form-group has-feedback"&gt;
              {!! Form::text('email', null, array('class' =&gt; 'form-control', 'placeholder' =&gt; 'EMail')) !!}
              &lt;span class="glyphicon glyphicon-envelope form-control-feedback"&gt;&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="form-group has-feedback"&gt;
              {!! Form::password('password', array('class' =&gt; 'form-control', 'placeholder' =&gt; 'Password')) !!}
              &lt;span class="glyphicon glyphicon-lock form-control-feedback"&gt;&lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-xs-8"&gt;
                  &lt;div class="checkbox icheck"&gt;
                      &lt;label&gt;
                          &lt;input type="checkbox"&gt; Remember Me
                      &lt;/label&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;!-- /.col --&gt;
              &lt;div class="col-xs-4"&gt;
                  {!! Form::token() !!}
                  {!! Form::submit(null, array('class' =&gt; 'btn btn-primary btn-block btn-flat')) !!}
              &lt;/div&gt;
              &lt;!-- /.col --&gt;
          &lt;/div&gt;
          {!! Form::close() !!}
  </code></pre>
  
  <p>Edit: Found out that the following code I have works for login but the else statement is not executed when the login credentials are wrong. why?</p>
  
  <pre><code>public function handleLogin(Request $request)
      {
          $this-&gt;validate($request, User::$login_validation_rules);
          $data = $request-&gt;only('email', 'password');
          if(\Auth::attempt($data)){
              return redirect()-&gt;intended('home');
          }else {
              return back()-&gt;withInput();
          }
      }
  </code></pre>