votong / laravel-session-mongodb
A MongoDB session driver for Laravel 4, 5, 6, 7 and 8
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 27
pkg:composer/votong/laravel-session-mongodb
Requires
- php: >=8.0
- illuminate/session: ~4.0|~5.0|~6.0|~7.0|~8.0|~9.0|~10.0|~11.0
- mongodb/laravel-mongodb: *
This package is not auto-updated.
Last update: 2025-10-26 17:07:32 UTC
README
A MongoDB session driver for Laravel 4, 5, 6, 7 or 8 which is inspired by LMongo. For more information about Sessions, check http://laravel.com/docs/eloquent.
Installation
Make sure you have jenssegers\mongodb installed before you continue.
Laravel Version Compatibility
| Laravel | Package |
|---|---|
| 4.x.x | 1.0.x |
| 5.x.x | 1.2.x |
| 6.x.x | 1.3.x |
| 7.x.x | 1.4.x |
| 8.x.x | 1.4.x |
Install using composer:
composer require jenssegers/mongodb-session
Add the session service provider in app/config/app.php: (Below Laravel 7 Version)
'Jenssegers\Mongodb\Session\SessionServiceProvider',
Change the session driver in app/config/session.php to mongodb:
'driver' => 'mongodb',
Optional: change the connection to a connection using the mongodb driver from app/config/database.php:
'connection' => 'mongodb',