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

jamieburnip's avatar

Changing the session connection and path

Does anyone know of a good way to change the session connection and path to data taken from the database?

and is there a way to stop this from messing with CSRF verification?

I've tried this

$this->app['config']['session.driver'] = 'database';
$this->app['config']['session.connection'] = $tenant->database;
$this->app['config']['session.path'] = $tenant->database;

But I get a token miss match on the first try then when I reload it's fine.

0 likes
0 replies

Please or to participate in this conversation.