laravel debugbar is a handy tool to have because it shows you what is in session (although in your case you can inspect the database)
So, are records being created and updated in the sessions table?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello everyone,
I am using laravel 6 and trying to use session and using database as a driver. But every time I am trying to it turns out to be a failure.
My session configaration:
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_DOMAIN=null
CONNECTION=null
I am trying to save data in the following way:
session()->put('test','sdfsdfs');
I even used:
session->save()
I also tried cookie but it failed. I used dd() to check and it temporarily saves data. But later found out dumping data will not save to session. But even without dumping data, it's not working.
Then I found out in another discussion about changing the sessionStart middleware to the protected $middleware variable but it fails too.
Another thing is I tried dumping session() and saw there are data that is saved by the application and that means session is working. But for some reason I am not able to save the data.
Please give me some suggestion.
Please or to participate in this conversation.