I'm using session to store some data. I've a session named searchData, that is an array. it is having values
Array ( [Event] => 5 [Hall] => 5 [Date] => 2019-06-25 [Time] => Array ( [0] => Day ) )
I'm trying to add another array of values into the existing array, after adding the values it is returning the new values inside the array like below
[searchData] => Array
(
[event] => 5
[hall] => 5
[date] => 2019-06-25
[time] => Array
(
[0] => day
)
[package_id] => 1
[price] => 6300
[advance] => 3000
[selectedPrice] => 3000
[add-on] => Array
(
[5-id] => 5
[5-price] => 100.0000
[5-count] => 1
)
)
when I refresh the page and print the values in session the newly added array is not showing.
Here is the code used for adding the array of values to existing session.
$request->session()->put("searchData.add-on.{$addOn->id}-id", $addOn->id);
$request->session()->put("searchData.add-on.{$addOn->id}-price", $addOn->price);
$request->session()->put("searchData.add-on.{$addOn->id}-count", $request->count);
in my config/session.php i've changed the below section
'expire_on_close' => true,