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

deshi's avatar
Level 10

Laravel 5.3.6 session problem

Does anyone have a problem with sessions in Laravel 5.3.6 or above.I 'm trying to set some data and when try to get it, i see nothing .

0 likes
3 replies
deshi's avatar
Level 10

I don't think that is the problem because i tried everywhere in my class. I'm just trying the following simply thing:

session(['foo'=>'bar']);

Then I comment : //session(['foo'=>'bar']);

and add the follow code: $value = session()->all(); dd($value); In my session has nothing about 'foo'. PS: All of my routes are under web middleware group,and I'm using file storage about sessions if it matters.

deshi's avatar
deshi
OP
Best Answer
Level 10

I'm idiot ,just simply forgot about session->save(); :)

Please or to participate in this conversation.