Level 70
Can you try directly calling session()?
Session()->put();
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've got two controller actions handling POST requests.
first:
//store email & password in session
$request->session()->put('email', $request->email);
$request->session()->put('password', $request->password);
second:
//store agb accepted
$request->session()->put('agb_accepted', 'true');
//redirect to enter PIN
return view('enter_pin');
After storing the AGBs I've included
{{ dd(session()->all()) }}
inside my "enter_pin" view. After the first submit of agb_accepted form the value is set to the session, but when I reload the enter_pin page only the "agb_accepted" is "deleted". The values of email and password are stored fine.
-Any idea where things go wrong?
Please or to participate in this conversation.