title: Session not passing to the view laravel
body: <p>I am trying to redirect to a route and pass data and I used with but no go and I also used to just simply set the sessions and then fetch them in the view but no go</p>
  
  <p>Controller code</p>
  
  <pre><code>if($socialUser) {
  
     Session::put('redirect', 'student-dashboard');
     Session::save();
  
     return redirect('/register/candidate');
  }
  </code></pre>
  
  <p>View code</p>
  
  <pre><code>&lt;?php if(\Session::get('redirect')) {
  
          $redirect = session('redirect');
          echo $redirect;
          die();
      } 
  ?&gt;  
  </code></pre>
  
  <p>But it never enters this if check and I need data on this view so any advise on this will be helpful.</p>
  
  <p>Please Note :- Session is available in the controller after being sent and I am using Laravel 5.6</p>