laravel create session code example
Example 1: set session in laravel
Session::put('variableName', $value);
Example 2: session variable in laravel
$request->session()->put('key','value');
Example 3: session flash
session()->flash('key', 'value');
Example 4: session laravel
session(['name' => 'data']);
Example 5: set session data in laravel
$value = Session::get('key');
$value = session('key');
Example 6: session in laravel
session()->regenerate();