Level 122
Did you set SESSION_DRIVER in the .env file and then run php artisan config:clear ?
(or remove SESSION_DRIVER from .env)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I configured database session this way:
config/session.php:
'driver' => env('SESSION_DRIVER', 'database'),
Then I executed:
php artisan session:table
php artisan migrate
php artisan optimize:clear
composer dump-autoload
But when I sign in/out, my session table is always empty.
echo 'SELECT * FROM public.sessions
ORDER BY id ASC;' | psql mydatabase
Is it something wrong in my configuration ?
Did you set SESSION_DRIVER in the .env file and then run php artisan config:clear ?
(or remove SESSION_DRIVER from .env)
Please or to participate in this conversation.