Session

Configuration

Since HTTP driven applications are stateless, sessions provide a way to store information about the user across requests. Laravel ships with a variety of session back-ends available for use through a clean, unified API. Support for popular back-ends such as Memcached, Redis, and databases is included out of the box.

The session configuration is stored in config/session.php. Be sure to review the well documented options available to you in this file. By default, Laravel is configured to use the file session driver, which will work well for the majority of applications.

Before using Redis sessions with Laravel, you will need to install the predis/predis package (~1.0) via Composer.

Note: If you need all stored session data to be encrypted, set the encrypt configuration option to true.

Reserved Keys

The Laravel framework uses the flash session key internally, so you should not add an item to the session by that name.