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