title: Redirecting with a message not working in Laravel 5
body: <p>I have a following code in my <code>posts.create</code> action. </p>
  
  <pre class="lang-php prettyprint-override"><code>// ...
  return redirect(route('posts.index'))-&gt;with('flashMessage', 'test');
  // ...
  </code></pre>
  
  <p>I expect <code>$flashMessage</code> variable to be available in the <code>posts.index</code> view, however, it is not. What am I doing wrong?</p>
  
  <p><strong>P.S</strong></p>
  
  <p>I don't want to set the flash message using <code>Session::flash('flashMessage', 'test')</code>, because it won't work in case of json responses.</p>