Default session driver storage in Laravel

Laravel have default session driver set in .env file. but we can also update it to other session driver.

To update it you can use session.php file located in config folder. session file allow you to make changes in other session properties. But we now discuss to here about session driver.

This option controls the default session “driver” that will be used on requests. By default, we will use the lightweight native driver but you may specify any of the other wonderful drivers provided here.

How to use it, you can either update in .env file or session file

when you using session_driver as database, database create “sessions” named table in you database. You can also change this table name and assign any custom name by changing in session.php

created session files are save into Storage folder, the path is storage/framework/sessions. you also update the path of storage session.php

Thanks!

Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Yes1
No0
Harinder Singh

Harinder Singh

My name is Harinder Singh and I specialize in Software industry. I consider myself as a life learner. I love learning new concepts, embracing new ideas and reading and searching for innovation.