It's pretty clear in the docs. There is a section for saving something to the session, and retrieving it from session. https://laravel.com/docs/5.8/session#using-the-session
Read the docs for the tool you are trying to learn.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
@PSYLOGIC - Thanks for answer. After register redirect to this page.
I want enter this code. (Of course mobile number and the code save in database and send a sms to mobile).
How to enter session code number?
public function send(Request $request)
{
$code = $request->code;
$mobile = $_GET($request->mobile);
$user = User::whereCode($code)->whereMobile($mobile)->first();
if($user){
$user->verification_code = 1;
$user->save();
alert()->success('ok');
return redirect()->back();
} else {
alert()->error('error');
return redirect()->back();
}
}
I have verification_code in users table. I want In case of enter true code and mobile number, verification_code change to 1
Please or to participate in this conversation.