Maybe you can see how Jetstream, see: https://jetstream.laravel.com/features/browser-sessions.html
It is important to use the database driver for your sessions, but with that I think you can the function like showed here: https://github.com/laravel/jetstream/blob/4.x/src/Http/Livewire/LogoutOtherBrowserSessionsForm.php#L99
The links are more as an example :)
For the database driver you need to create a table, see in the Laravel docs: https://laravel.com/docs/10.x/session#database
After that you can create a Session model for it or use the code as from the Jetstream source to load the sessions.
I used the below package other than increasing the overhead on the sever by sending request to get the session data from the database the show it in the browser what do you think https://github.com/cjmellor/browser-sessions
I used the below package other than increasing the overhead on the sever by sending request to get the session data from the database the show it in the browser what do you think https://github.com/cjmellor/browser-sessions
To be honest I'm sure about what you mean. The package you link also need the database driver for sessions. And the information about sessions is always stored on the server not on the client.
But I think it can be a useful package to help with what you want, so nice found!
Actually i discovered that even if I used $session->all() as the docs says also I will get the sessions from the database because I am using the database driver not file driver
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community