Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

Laravel 10 Session Configuration: Database Driver Not Working

Hey Laracast community,

I'm currently using Laravel 10 with Sanctum for API authentication, and I'm curious about the session driver being used by Sanctum. In my application, I've switched the session driver from files to the database. but the sessions table is always empty !

session.php

return [
    // ... other configuration options
    'driver' => env('SESSION_DRIVER', 'database'),
    // ... other configuration options
];

.env

SESSION_DRIVER=database
0 likes
1 reply
gych's avatar

Did you clear the config after updating the SESSION_DRIVER?

php artisan config:clear

Please or to participate in this conversation.