session set and get in laravel

Store a piece of data in the session…


session(['key' => 'value']);

Retrieving Data

 $value = $request->session()->get('key');

Leave a Reply