laravel when user login set session code example
Example: set session after login with laravel
$user = Auth::User();
Session::put('user', $user);
$user=Session::get('user');
return $user->name;
$user = Auth::User();
Session::put('user', $user);
$user=Session::get('user');
return $user->name;