You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,10 @@ A MongoDB session driver for Laravel
5
5
Installation
6
6
------------
7
7
8
-
Make sure you have [jenssegers\mongodb](https://github.com/jenssegers/Laravel-MongoDB) installed before you continue.
9
-
10
8
Install using composer:
11
9
12
10
composer require 1ff/laravel-mongodb-session
13
11
14
-
Add the service provider in `config/app.php`:
15
-
16
-
'ForFit\Session\SessionServiceProvider::class',
17
-
18
12
Change the connection in `config/session.php` to the name of the mongo connection from your `config/database.php` config
19
13
20
14
'connection' => 'mongodb',
@@ -28,13 +22,7 @@ Advantages
28
22
29
23
* 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.
30
24
* This way, the collection's size will remain around the size you expect and won't get falsely filled with unused data.
31
-
* The package automatically adds a migration which creates the index.
32
-
33
-
Warning
34
-
-------
35
-
36
-
This session driver is not compatible with other session drivers, because it uses its all table structure.
37
-
If you are using another mongodb session driver at the moment make sure you set a new collection for this one.
25
+
* 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`.
0 commit comments