Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit 362d4bd

Browse files
committed
Improove the readme
1 parent 0349efb commit 362d4bd

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,10 @@ A MongoDB session driver for Laravel
55
Installation
66
------------
77

8-
Make sure you have [jenssegers\mongodb](https://github.com/jenssegers/Laravel-MongoDB) installed before you continue.
9-
108
Install using composer:
119

1210
composer require 1ff/laravel-mongodb-session
1311

14-
Add the service provider in `config/app.php`:
15-
16-
'ForFit\Session\SessionServiceProvider::class',
17-
1812
Change the connection in `config/session.php` to the name of the mongo connection from your `config/database.php` config
1913

2014
'connection' => 'mongodb',
@@ -28,13 +22,7 @@ Advantages
2822

2923
* 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.
3024
* 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`.
3826

3927
Enjoy!
4028
------

0 commit comments

Comments
 (0)