I am storing some data in variables like this,
$dbs_office = $request->session()->get('dbs_office');
$reference = $request->session()->get('reference');
$request->session()->flush();
return view('confirmation', ['ref' => $reference, 'dbs_team' => $dbs_office]);
I was hoping that by storing some of the session data in their vars I would be able to persist the data past the flush, however the vars are empty when I check. Is there a way to store these bits of data for use in a view, but remove the session data totally?