Level 50
$request->session()->forget('abc.xyz.124');
// or use global helper
session()->forget('abc.xyz.124');
1 like
Hi I can't figure out how to remove array element by index.
for example I have
$array = [ 123 => 456, 124 => 457, 777 => 123 ]; Session::set('abc.xyz', $array);
So how to remove $array[124] from current session
$request->session()->forget('abc.xyz.124');
// or use global helper
session()->forget('abc.xyz.124');
Please or to participate in this conversation.