I use Redis to store sessions, but how do I get all of the user’s sessions? This is easy to do when using mysql, but how can I do it when using Redis?
I use Redis to store sessions, but how do I get all of the user’s sessions? This is easy to do when using mysql, but how can I do it when using Redis?
2
Answers
If you would like to retrieve all the data in the session, you may use the all method:
Check Laravel Docs
To get all sessions you can do:
To get the sessions associated to the currently authenticated user: