//set session
Session::put('sessionName', 'message');
//get session
Session::get('sessionName');
//don't forget to use "use IlluminateSupportFacadesSession;"
$request->session()->put('key','value');
Session::put('variableName', $value);
session()->put('telegram_login', false);
$value = Session::get('key');
$value = session('key');
Session::get('variableName');
// Via a request instance...
$request->session()->put('key', 'value');
// Via the global "session" helper...
session(['key' => 'value']);
// Via a request instance...
$request->session()->put('key', 'value');
// Via the global "session" helper...
session(['key' => 'value']);
session(['variableName' => $value]);
php artisan session:table
'for make session: syntax: session(key => value), ex. session('user1'=>'kinjal')
session can remove using forget() perticular user; syntax: session().forget(key);
To delete all users from session: syntax: session()->flush();
To fetch all session data: syntax: session()->all();
$data=[
'name' => $request->input('name')
];
session(['data'=>$data]);
$data=Session::get('data');
$data1=[
'email'=>$request->input('email')
];
$data=array_merge( $data, $data1);
session(['data'=>$data]);
unset($_SESSION);