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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners