laravel get session vars code example
Example 1: session variable in laravel
$request->session()->put('key','value');
Example 2: laravel use session values in view
<!--This is placed in the view section --> {{ session('key_name') }}
$request->session()->put('key','value');
<!--This is placed in the view section --> {{ session('key_name') }}