session set laravel code example
Example 1: get session blade
{{ session()->get('name') }}
Example 2: laravel destroy session
# ref: https://laravel.io/forum/02-06-2014-session-destroy
Session::forget('yourKeyGoesHere') // Removes a specific variable
Example 3: set session in laravel
Session::put('variableName', $value);
Example 4: session variable in laravel
$request->session()->put('key','value');
Example 5: session flash
session()->flash('key', 'value');
Example 6: session laravel
session(['name' => 'data']);