laravel store variable in session code example
Example 1: session variable in laravel
$request->session()->put('key','value');
Example 2: laravel get session variable in controller
$value = Session::get('variableSetOnPageA');
Example 3: set session data in laravel
$value = Session::get('key');
$value = session('key');