session and Session in laravel code example
Example 1: session variable in laravel
$request->session()->put('key','value');
Example 2: set session in laravel
session(['variableName' => $value]);
$request->session()->put('key','value');
session(['variableName' => $value]);