How to enter session code number?

Posted 2 months ago by irankhosravi

@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?

Code

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 sign in or create an account to participate in this conversation.