Laravel allows you to use a few different Session drivers. Redis and Memcache are the fastest options to use for your session driver so you'll find a lot of people using this option. The problem comes when you're using Redis as both the cache driver and the session driver.

'redis' => [ 'client' => 'predis', 'default' => [ 'password' => env('REDIS_PASSWORD', null), 'database' => 0, ], 'session' => [ 'password' => env('REDIS_PASSWORD', null), 'database' => 1, ], ], Now we need to tell redis to use this connection as the session.

/* |-------------------------------------------------------------------------- | Session Database Connection |-------------------------------------------------------------------------- | | When using the "database" or "redis" session drivers, you may specify a | connection that should be used to manage these sessions.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners