2

Is there a middleware for sessions in PHP Slim Framework? If not, is there a lightweight session library that works well with the Slim Framework? Its important that the library supports session storage in a database (MySQL).

kaldimar
  • 187
  • 2
  • 16
user3033490
  • 405
  • 6
  • 15

3 Answers3

3

Slim session manager package can be used. It's available at:

https://github.com/yusukezzz/slim-session-manager

  1. Composer based installation
  2. Slim middleware
  3. Can be used with any database driver

Hope it helps.

anupam
  • 726
  • 5
  • 11
3

PHP native sessions can be database backed.

PHP sessions in Database

It's pretty easy to use native PHP sessions, not sure why you'd need a library.

Community
  • 1
  • 1
ckm
  • 1,298
  • 9
  • 15
0

According to their Session Docs, they only have

  • Native Session Store
  • Cookie Session Store

It doesn't appear to have a database backed session. Maybe its in development or maybe there is a 3rd party plugin for it.

Connor Tumbleson
  • 3,215
  • 2
  • 23
  • 36