Maybe you can achieve this by storing a user_id in the session. When a user logs in check if a user_id is in a session already. And so on.
I am half way there with eriktisme's idea
I changed the Session.php from 'driver'=>'file' to 'driver'=>'database'
Now each active session is being saved in the Database table "Sessions"
But the problem is its saving only id, payload, last_activity and even for the same userIDs the id is different.
If i could somehow store an extra field say "user_id" i can then achieve what i asked above using database observers.
But how do i store "user_id" and instruct laravel to save it everytime a session starts?
Do a before filter on every page.
App::before(function($request)
{
// Check if user is logged in
// If true store user id
// else don't
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community