laravel session global helper code example
Example 1: laravel get all session data
$data = $request->session()->all();
Example 2: session variable in laravel
$request->session()->put('key','value');
$data = $request->session()->all();
$request->session()->put('key','value');