PHPackages                             ebethus/mongodb-laravel-session - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ebethus/mongodb-laravel-session

ActiveLibrary

ebethus/mongodb-laravel-session
===============================

A mongodb session driver for laravel

v0.1.0(2y ago)027MITPHP

Since Jul 4Pushed 2y agoCompare

[ Source](https://github.com/EBethus/mongodb-laravel-session)[ Packagist](https://packagist.org/packages/ebethus/mongodb-laravel-session)[ RSS](/packages/ebethus-mongodb-laravel-session/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Laravel Mongodb Session driver
==============================

[](#laravel-mongodb-session-driver)

A MongoDB session driver for Laravel

**Laravel
Version****Package
Version****Install using
this command**5.x.x, 6.x1.x.xcomposer require 1ff/laravel-mongodb-session:^1.07.x2.x.xcomposer require 1ff/laravel-mongodb-session:^2.08.x3.x.xcomposer require 1ff/laravel-mongodb-session:^3.09.x4.x.xcomposer require 1ff/laravel-mongodb-session:^4.0Installation
------------

[](#installation)

Install using composer:

```
composer require 1ff/laravel-mongodb-session

```

Change the connection in `config/session.php` to the name of the mongo connection from your `config/database.php` config

```
'connection' =>  'mongodb',

```

Update your .env file and change the `SESSION_DRIVER` to mongodb

```
SESSION_DRIVER=mongodb

```

Advantages
----------

[](#advantages)

- This driver uses the [MongoDB TTL indexes](https://docs.mongodb.com/manual/core/index-ttl/) meaning when a session key expires it will be automatically deleted. So no need for garbage collection implementation.
- This way, the collection's size will remain around the size you expect and won't get falsely filled with unused data.
- The package automatically adds a migration which creates the index. If you change the name of the `session.table` you should rerun the ttl index creation command `php artisan mongodb:session:index`.

Enjoy!
------

[](#enjoy)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

1026d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25f561a3fd260935cc3ea5dc049b4ff598c37408dfdbbc129d091221de6c2954?d=identicon)[alb\_be](/maintainers/alb_be)

---

Top Contributors

[![t1sh0o](https://avatars.githubusercontent.com/u/3911728?v=4)](https://github.com/t1sh0o "t1sh0o (11 commits)")[![bethuxs](https://avatars.githubusercontent.com/u/191869?v=4)](https://github.com/bethuxs "bethuxs (5 commits)")[![spont4e](https://avatars.githubusercontent.com/u/10523455?v=4)](https://github.com/spont4e "spont4e (5 commits)")[![tuseto](https://avatars.githubusercontent.com/u/9108143?v=4)](https://github.com/tuseto "tuseto (3 commits)")

### Embed Badge

![Health badge](/badges/ebethus-mongodb-laravel-session/health.svg)

```
[![Health](https://phpackages.com/badges/ebethus-mongodb-laravel-session/health.svg)](https://phpackages.com/packages/ebethus-mongodb-laravel-session)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k124.3M621](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k28](/packages/fruitcake-laravel-debugbar)[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[prologue/alerts

Prologue Alerts is a package that handles global site messages.

3486.1M30](/packages/prologue-alerts)[illuminate/http

The Illuminate Http package.

11936.0M5.0k](/packages/illuminate-http)[illuminate/routing

The Illuminate Routing package.

1238.6M2.2k](/packages/illuminate-routing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
