ebethus/mongodb-laravel-session 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ebethus/mongodb-laravel-session

最新稳定版本:v0.1.0

Composer 安装命令:

composer require ebethus/mongodb-laravel-session

包简介

A mongodb session driver for laravel

README 文档

README

A MongoDB session driver for Laravel

Laravel
Version
Package
Version
Install using
this command
5.x.x, 6.x 1.x.x composer require 1ff/laravel-mongodb-session:^1.0
7.x 2.x.x composer require 1ff/laravel-mongodb-session:^2.0
8.x 3.x.x composer require 1ff/laravel-mongodb-session:^3.0
9.x 4.x.x composer require 1ff/laravel-mongodb-session:^4.0

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

  • This driver uses the MongoDB TTL indexes 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!

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-04