votong/laravel-session-mongodb

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

0.0.2 2024-06-08 12:26 UTC

This package is not auto-updated.

Last update: 2024-12-22 13:15:43 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

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