You can configure the session class to use the database to store session data, then you can query the session table to execute your queries, this is a function in Laravel itself.
The exact way to configure sessions will depend on the type of database you are using, here is a guide to setting up sessions using databases: http://laravel.com/docs/session/config#database
Pratheek rebala
source share