asset manager changes

This commit is contained in:
kshitige
2024-06-03 12:14:10 +05:30
parent 4618bd2c6a
commit f8a181e7ca
4 changed files with 34 additions and 7 deletions

View File

@@ -694,6 +694,7 @@ class AuthController extends Controller
public function signUp2(StoreAssetManagerRegistrationRequest $request)
{
// dd($request->all());
$validated = $request->validated();
if (!$request->has('g-recaptcha-response')) {
@@ -730,7 +731,7 @@ class AuthController extends Controller
// 'contact_otp' => $mobile_otp //contact OTP
// ]);
$insertOtp = RegistrationOtp::create([
$insertOtp = RegistrationOtp::insertGetId([
'contact_number'=>$request->contact_number2,
// 'contact_otp'=>$mobile_otp,
// 'contact_expire_at'=>Carbon::now()->addMinutes('4'),
@@ -738,11 +739,12 @@ class AuthController extends Controller
'email_otp'=>$otp,
'email_expire_at'=>Carbon::now()->addMinutes('2'),
]);
// dd($insertOtp);
return response()->json(['status' => 200, 'message' => 'OTP has been sent to your Email & Contact no.']);
} else {
Session::forget('user-registration');
$otp = $this->otpGenerate($request->email);
$otp = $this->otpGenerate($request->email2);
// $mobile_otp = $this->otpGenerate($validated['contact_number2']);
$userRegistration = [
'name' => $validated['name2'],
@@ -759,9 +761,16 @@ class AuthController extends Controller
'title' => 'Mail from ItSolutionStuff.com',
'body' => 'This is for testing email using smtp.'
];
$insertOtp = RegistrationOtp::insertGetId([
'contact_number'=>$request->contact_number2,
// 'contact_otp'=>$mobile_otp,
// 'contact_expire_at'=>Carbon::now()->addMinutes('4'),
'email'=>$request->email2,
'email_otp'=>$otp,
'email_expire_at'=>Carbon::now()->addMinutes('2'),
]);
Mail::to($validated['email2'])->send(new OtpMail($mailData, $otp));
// $this->thirdPartyOTP($validated['contact_number2'], $mobile_otp);
// Mail::to('yadavritikesh29@gmail.com')->send(new OtpMail($mailData, $otp));
return response()->json(['status' => 200, 'message' => 'OTP has been sent to your email']);
@@ -1322,4 +1331,4 @@ class AuthController extends Controller
return $response;
// return true;
}
}
}