I have a session variable that contains a variety of json objects and I want to be able to update these.
For example,
$userIndex = 123;
session()->get('app.users')[$userIndex]['phones']['landline'];
session()->get('app.users')[$userIndex]['phones']['mobile'];
How do I update the content value? How do I session put a new mobile number?
session()->get('app.users')[$userIndex]['phones']['mobile'] = '12345678';
session()->replace('app.users')[$userIndex]['phones']['mobile'] = '12345678';