laravel session put and get code example
Example 1: set session in laravel
Session::put('variableName', $value);
Example 2: set session in laravel
Session::get('variableName');
Example 3: laravel use session values in view
<!--This is placed in the view section --> {{ session('key_name') }}
Example 4: set session data in laravel
Session::put('key', 'value');
session(['key' => 'value']);
Example 5: set session data in laravel
$value = Session::get('key');
$value = session('key');