This commit is contained in:
2023-12-03 15:04:10 +05:00
parent 21aab6ca7d
commit b4521e6f24
3 changed files with 13 additions and 3 deletions

View File

@@ -38,6 +38,9 @@ class ResetPasswordController extends Controller
$user = User::where('username', $request->username)->first();
// sendSMSVerification($user->phone);
$phone_code = rand(10000, 99999);
$verification = Verification::where(['username' => $user->phone])->first();
$verification ? $verification->update(['code' => $phone_code]) : Verification::create(['username' => $user->phone, 'code' => $phone_code]);
return response()->json([
'step' => 1,