2 months ago

How to login after enter verification code in laravel?

Posted 2 months ago by irankhosravi

We have a page with a verification code that redirects to this page after the user logs in. I want to login after clicking the user confirmation button.


public function send(Request $request)
    $user = User::whereCode($request->code)->whereMobile($request->mobile)->first();
        $user->verification_code = 1;

        event(new Registered($user = $this->create($request->all())));


        return $this->registered($request, $user)
                ?: redirect($this->redirectPath());
    } else {
        return redirect()->back();

Please sign in or create an account to participate in this conversation.