Sessions are used to store information about the user temporarily across the requests. The session configuration file is stored in config/session.php, from this file you can change the session driver, session lifetime, and more. For example, if you want to encrypt all your session data you can configure it easily from the config/session.php file.

By default, laravel is configured to use the file session driver which is store your sessions files in storage/framework/sessions.

You can store the session with a request instance or from the request() helper method which returns the current request instance : $request->session()->put('key' , 'value'); You can also retrieve session data : $value = $request->session()->get('key'); #retrieving-amp-deleting-an-item Retrieving & Deleting An Item
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners