title: Laravel session/flash variables not persisting after redirect
body: <p>So I'm trying to redirect with a session/flash variable, but I can't seem to figure out why the session variable is never present after the redirect.</p>
  
  <p>I have a controller action like this:</p>
  
  <pre><code>public function verifyAction(Request $request)
  {
      return redirect()
          -&gt;route('login')
          -&gt;with('test', 'Test');
  }
  </code></pre>
  
  <p>and on the login route I'm dumping the session (using Laravel's Session()->all() function), however it never seems to contain the 'test' key.</p>
  
  <p>I'm using 'artisan route:list' to show the routes like this:</p>
  
  <pre><code>+--------+----------+--------+--------+---------------+------------+
  | Domain | Method   | URI    | Name   | Action        | Middleware |
  +--------+----------+--------+--------+---------------+------------+
  |        | GET|HEAD | login  | login  | @loginAction  | web        |
  |        | GET|HEAD | verify | verify | @verifyAction | web        |
  +--------+----------+--------+--------+---------------+------------+
  </code></pre>
  
  <p>and both routes are using the web middleware as specified in the docs ([laravel.com/docs][1]) but the session data is always empty after the redirect, like this:</p>
  
  <pre><code>["_flash"]=&gt;
  array(2) {
      ["old"] =&gt; array(0) {}
      ["new"] =&gt; array(0) {}
  }
  </code></pre>
  
  <p>I'm expecting to see the 'test' key in the _flash array after the redirect but actually it's always empty.
  Any ideas what's going on here and how I could get it working?</p>
  
  <p>One thing that strikes me as strange is that I can add normal session variables in the controller like this and it works fine:</p>
  
  <pre><code>Session::put([
      'test-2' =&gt; 'Testing'
  ]);
  </code></pre>
  
  <p>So session variables work fine, it's just flash variables that aren't working.</p>
  
  <p>Distro: Ubuntu 19.04 (Disco Dingo), Laravel 5.8, Laradock, Docker version 18.09.5, build e8ff056, Php 7.2.15.</p>
  
  <p><strong>EDITS</strong></p>
  
  <p>Browser activity:</p>
  
  <p>Request URL: <a href="http://localhost/verify?code=ABC&amp;uid=2" rel="nofollow noreferrer">http://localhost/verify?code=ABC&amp;uid=2</a>
  Request Method: GET
  Status Code: 302 Found
  Remote Address: [::1]:80
  Referrer Policy: no-referrer-when-downgrade</p>
  
  <p>Request URL: <a href="http://localhost/login" rel="nofollow noreferrer">http://localhost/login</a>
  Request Method: GET
  Status Code: 200 OK
  Remote Address: [::1]:80
  Referrer Policy: no-referrer-when-downgrade</p>