asset manager changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user