Route::get('check', function(){
Session::put('id', 1);
Session::put('id1', 11);
return Redirect::to('check1');
});
Route::get('check1', function(){
return Session::all();
});
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I had 2 routes if i uncomment from 1 route i can able to see my session values in 1st route. But if i get redirect to my 2nd route i cant able see my session variables can any one help me out.
Route::get('/check', function(){
Session::put('id', 1);
Session::put('id1', 11);
//return Session::all();
return Redirect::to('/check1');
});
Route::get('/check1', function(){
return Session::all();
});
Please or to participate in this conversation.