Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

oriolhp's avatar

Something's changed in Laravel 5.2 Session?

I was using laravel 5.1 and used to have a session route for checking sessions

$router->get('session', function()
{
    return dd(Session::all());
});

Which allways returned at least an array of 3:

array:3 [▼
  "_token" => "3hSm8uzRVrZNxCgBJLflsnyr6LT6zPsPc22mODhi"
  "_previous" => array:1 [▶]
  "flash" => array:2 [▶]
]

Now in laravel 5.2 the same route returns a null array and sessions are not working in a new fresh installation of 5.2.*

0 likes
3 replies
oriolhp's avatar

Thanks martinbean!

If I had just scrolled down a little bit I would have seen that routes file has changed ans now there's a 'web' group!

I feel a bit ashamed bout my incapacity of scroll down!

:)

Thanks again

Please or to participate in this conversation.