A MongoDB session driver for Laravel 4, 5, and 6

v1.3.0 2019-12-03 06:59 UTC

This package is auto-updated.

Last update: 2020-02-03 07:23:38 UTC


A MongoDB session driver for Laravel 4, 5, or 6 which is inspired by LMongo. For more information about Sessions, check


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

Install using composer:

composer require jenssegers/mongodb-session

Add the session service provider in app/config/app.php:


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',