title: Laravel 4 'with' data persisting
body: <p>I'm using Laravel 4's <code>App::error</code> class to catch Sentry exceptions throughout my application and pass the data back to the template using the <code>withErrors()</code> function.</p>
  
  <p>Simple route:</p>
  
  <p><code>routes.php</code></p>
  
  <pre><code>Route::post('/login...
  
  ...
  
  $credentials = array(
      'email'    =&gt; Input::get('email'),
      'password' =&gt; Input::get('password') 
  );
  
  $user = Sentry::authenticate($credentials);
  
  // Exception thrown...
  </code></pre>
  
  <p>Then to catch the exceptions:</p>
  
  <p><code>exceptions.php</code></p>
  
  <pre><code>App::error(function(Cartalyst\Sentry\Users\WrongPasswordException $e) {
      return Redirect::back()-&gt;withErrors(array('failed' =&gt; 'Email or password is incorrect'))-&gt;withInput();
  });
  </code></pre>
  
  <p>In the view:</p>
  
  <p><code>/views/login/login.blade.php</code></p>
  
  <pre><code>@if ($errors-&gt;has('failed'))
      &lt;strong&gt;{{ $errors-&gt;first('failed') }}&lt;/strong&gt;
  @endif
  </code></pre>
  
  <p>The problem is, when you refresh the page after a failed log in attempt these errors persist so you see them twice. Refreshing a second time, they have cleared. Same goes for the input (passed with <code>withInput()</code>).</p>
  
  <p>If the errors are caught within the route (rather than in <code>App:error</code>), everything works as normal. Should I be clearing the stored data manually using the <code>App::error</code> methods?</p>