1//store multipal data
2Session::put('user', ['first_name' => $request->get('first_name'), 'user_role' => Auth::user()->user_role, 'city' => Auth::user()->city]);
3
4//in blade template
5<p>
6 {{Session::get('user')['city']}}
7</p>
8
9@foreach (Session::get('user') as $user)
10 {{$user}}
11@endforeach
12
13//condtion check
14@if(Session::has('user'))
15 @foreach (Session::get('user') as $user)
16 {{ $user }}
17 @endforeach
18@endif
19// condition check using ternary operator
20{{ (Session::has('user')) ? 45 : 55}}
21
22//delete session
23Session::forget('customer');
24//@sujay