Answer the question
In order to leave comments, you need to log in
Larevel 5.2 - How to store values in session with database driver?
Hello, please help me to understand.
Now the application on Laravel v5.2.39 uses "file" as a driver and accordingly stores session data in files at the address "storage/framework/sessions". I switched the session driver to "database" in the settings, having previously created the sessions table
Schema::create('sessions', function ($table) {
$table->string('id')->unique();
$table->text('payload');
$table->integer('last_activity');
});
Session::put('foo', $foo);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question