I am pretty new to Laravel 5 and I'm trying to store some variables in session to use them on other pages. The problem is that everytime I go to another page or I refresh the page, the session is empty. I tried using Session::get('key')
, I tried using session('key')
as Laravel documentation says, I tried with $request->session()->get('key')
and finally I tried ussing my own session handler which is assigning values directly to global $_SESSION variable, but no result.
I tried the solution from this thread, but when I refresh my page, session is empty. It work fine just if I assign a value right before I use it.
What am I doing wrong?