1Route::get('home', function () {
2 // Retrieve a piece of data from the session...
3 $value = session('key');
4
5 // Specifying a default value...
6 $value = session('key', 'default');
7
8 // Store a piece of data in the session...
9 session(['key' => 'value']);
10});