title: Laravel 5.2 Redirect with Flash Data
body: <p>I just upgraded to Laravel 5.2 from 4.2 to try the new feature of the framework. But I have trouble on setting <code>flash session</code> data to be sent on other controller/route.</p>
  
  <p>Here is my simple code:</p>
  
  <p><strong>controller</strong></p>
  
  <pre><code>&lt;?php namespace App\Http\Controllers;
  
  use Session;
  use Illuminate\Http\Request;
  
  class ctest extends Controller {
  
      public function page_a() {
          return redirect('page_b')-&gt;with('verified', 'Go to page B');
      }
  
      public function page_b(Request $request) {
          dd(array(
              session()-&gt;has('verified'),             // Option a
              $request-&gt;session()-&gt;get('verified')    // Option b
          ));
      }
  }
  </code></pre>
  
  <p><strong>route</strong></p>
  
  <pre><code>// Old code
  // Route::get('/page_a', 'ctest@page_a');
  // Route::get('/page_b', 'ctest@page_b');
  
  // As pointed out by @rishal at the comment,
  // I tried using this group but I can't still get
  // the flash data.
  Route::group(['middleware' =&gt; ['web']], function () {
      Route::get('/page_a', 'ctest@page_a');
      Route::get('/page_b', 'ctest@page_b');
  });
  </code></pre>
  
  <p><strong>result on page_b</strong></p>
  
  <pre><code>array: [
    0 =&gt; false
    1 =&gt; null
  ]
  </code></pre>
  
  <p>I cannot figure out what's wrong with this. Whenever I got redirected to page_b, the session only contains <code>_token</code>, not including the <code>verified</code> flash session data that I already set on page_a.</p>
  
  <p><strong>PS: I'am using database to store session not file</strong></p>