Creating A Session To Store And Retrieve Data

[Solved] Creating A Session To Store And Retrieve Data | Php Frameworks Codeigniter - Code Explorer | yomemimo.com
Question : Creating a session to store and retrieve data

Answered by : annoying-addax-4y2c6vdzz3iz

Route::get('/home', function () { // Retrieve a piece of data from the session... $value = session('key'); // Specifying a default value... $value = session('key', 'default'); // Store a piece of data in the session... session(['key' => 'value']);
});

Source : https://laravel.com/docs/8.x/session | Last Update : Sat, 19 Jun 21

Answers related to creating a session to store and retrieve data

Code Explorer Popular Question For Php Frameworks Codeigniter