Merge pull request #12 from Ritikeshyadav/RitikeshFreeu
update profile verification module
This commit is contained in:
@@ -268,7 +268,7 @@ class LoginController extends Controller
|
||||
try {
|
||||
$otp = $this->otpGenerate($request->emailorphone);
|
||||
$mailData = [
|
||||
'title' => 'Mail from Freeu.in',
|
||||
'title' => 'Mail from Jerichoalternatives.in',
|
||||
'body' => 'This is for testing email using smtp.'
|
||||
];
|
||||
// $otp = $this->otpGenerate($request->email);
|
||||
@@ -284,7 +284,7 @@ class LoginController extends Controller
|
||||
// Session::put('user_id', $user->id);
|
||||
return response()->json(['user_id' => $user->id, 'status' => 200]);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json(['error' => 'Netwrok Error! Please try again after sometime.', 'status' => 500]);
|
||||
return response()->json(['error' => 'Network Error! Please try again after sometime.', 'status' => 500]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@ use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Auth;
|
||||
use App\Mail\OtpMail;
|
||||
use Mail;
|
||||
use App\Http\Controllers\Frontend\LoginController as sendOTP;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
@@ -27,15 +32,15 @@ class ProfileController extends Controller
|
||||
// dd($request->all());
|
||||
$validator = Validator::make($request->all(), [
|
||||
'name' => 'required|regex:/^[a-zA-Z ]+$/u|max:255',
|
||||
'email' => 'required|unique:users,email,' . $request->id . '',
|
||||
'contact_number' => 'required|numeric|digits:10|unique:users,contact_number,' . $request->id . '',
|
||||
// 'email' => 'required|unique:users,email,' . $request->id . '',
|
||||
// 'contact_number' => 'required|numeric|digits:10|unique:users,contact_number,' . $request->id . '',
|
||||
'profile_image' => 'image|mimes:jpeg,jpg,png|max:2000',
|
||||
'address' => 'required'
|
||||
], [
|
||||
'required' => 'The :attribute field must be required',
|
||||
'unique' => 'The :attribute field must be unique',
|
||||
'numeric' => 'The :attribute field must be in digits',
|
||||
'digits' => 'The :attribute field must have 10 digits',
|
||||
// 'unique' => 'The :attribute field must be unique',
|
||||
// 'numeric' => 'The :attribute field must be in digits',
|
||||
// 'digits' => 'The :attribute field must have 10 digits',
|
||||
// 'profile_image.mimes' => 'The :attribute can only be of type jpeg,jpg,png'
|
||||
]);
|
||||
|
||||
@@ -49,9 +54,9 @@ class ProfileController extends Controller
|
||||
|
||||
$addUser = User::where('id', $request->id)->update([
|
||||
'name' => $request->name,
|
||||
'contact_number' => $request->contact_number,
|
||||
// 'contact_number' => $request->contact_number,
|
||||
'address' => $request->address,
|
||||
'email' => $request->email,
|
||||
// 'email' => $request->email,
|
||||
'profile_image' => $image,
|
||||
]);
|
||||
|
||||
@@ -156,4 +161,77 @@ class ProfileController extends Controller
|
||||
return $messages;
|
||||
}
|
||||
}
|
||||
|
||||
public function sendEmailOTP(Request $request)
|
||||
{
|
||||
$validator = validator::make($request->all(), [
|
||||
'newEmail' => 'required|unique:users,email,' . Auth::guard('users')->user()->id . '',
|
||||
], [
|
||||
'required' => 'The :attribute field must be required',
|
||||
'unique' => 'The :attribute field must be unique',
|
||||
]);
|
||||
$otp = rand(1000, 9999);
|
||||
$mailData = [
|
||||
'title' => 'Mail from Jerichoalternatives.in',
|
||||
'body' => 'This is for testing email using smtp.'
|
||||
];
|
||||
Session::put('newEmail', $request->newEmail);
|
||||
Session::put('otp', $otp);
|
||||
// Mail::to($request->newEmail)->send(new OtpMail($mailData,$otp));
|
||||
return response()->json([
|
||||
'status' => 200,
|
||||
'message' => 'OTP sended on enter email',
|
||||
]);
|
||||
}
|
||||
|
||||
public function updateEmail(Request $request)
|
||||
{
|
||||
// dd('hello');
|
||||
if ($request->email_otp) {
|
||||
if ((int)$request->email_otp == Session::get('otp')) {
|
||||
$updateUserProfile = User::where('id', Auth::guard('users')->user()->id)->update([
|
||||
'email' => Session::get('newEmail'),
|
||||
]);
|
||||
Session::forget(['newEmail', 'otp']);
|
||||
return response()->json(['status' => 200, 'message' => 'Email update successfully']);
|
||||
}
|
||||
return response()->json(['status' => 201, 'message' => 'OTP invalid !']);
|
||||
}
|
||||
return response()->json(['status' => 201, 'message' => 'Please enter OTP']);
|
||||
}
|
||||
|
||||
public function sendOTPNumber(Request $request)
|
||||
{
|
||||
// dd('hello');
|
||||
$validator = validator::make($request->all(), [
|
||||
'newcontact_number' => 'required|unique:users,contact_number,' . Auth::guard('users')->user()->id . '',
|
||||
], [
|
||||
'required' => 'The :attribute field must be required',
|
||||
'unique' => 'The :attribute field must be unique',
|
||||
]);
|
||||
$otp = rand(1000, 9999);
|
||||
Session::put('contact_number', $request->newcontact_number);
|
||||
Session::put('mobile_otp', $otp);
|
||||
// $sendOTPMessage = (new sendOTP)->thirdPartyOTP($request->contact_number, $otp);
|
||||
return response()->json([
|
||||
'status' => 200,
|
||||
'message' => 'OTP sended to contact number',
|
||||
]);
|
||||
}
|
||||
|
||||
public function updateContactNumber(Request $request)
|
||||
{
|
||||
// dd(Session::get('mobile_otp'), Session::get('contact_number'), $request->mobile_otp);
|
||||
if ($request->mobile_otp) {
|
||||
if ((int)$request->mobile_otp == Session::get('mobile_otp')) {
|
||||
$updateUserProfile = User::where('id', Auth::guard('users')->user()->id)->update([
|
||||
'contact_number' => Session::get('contact_number'),
|
||||
]);
|
||||
Session::forget(['contact_number', 'mobile_otp']);
|
||||
return response()->json(['status' => 200, 'message' => 'Contact number update successfully']);
|
||||
}
|
||||
return response()->json(['status' => 201, 'message' => 'OTP invalid !']);
|
||||
}
|
||||
return response()->json(['status' => 201, 'message' => 'Please enter OTP']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3784,6 +3784,7 @@ input:focus {
|
||||
cursor: pointer;
|
||||
width: 25%;
|
||||
transition: 0.5s;
|
||||
background-color: #c18948;
|
||||
}
|
||||
.investor-profile .invest-form .save:hover {
|
||||
background-color: #c18948;
|
||||
@@ -4443,7 +4444,43 @@ span.start {
|
||||
.table-invest .categeory .tables {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.investor-profile p.edit-invest-profile {
|
||||
position: relative;
|
||||
}
|
||||
.investor-profile .invest-form .edit-invest-profile a {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
top: 10px;
|
||||
}
|
||||
.edit-modal input {
|
||||
width: 100%;
|
||||
padding: 7px;
|
||||
border: 1px solid #9e9e9e;
|
||||
border-radius: 5px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.edit-modal button.cancle-btn {
|
||||
border-radius: 5px;
|
||||
padding: 5px 40px;
|
||||
height: 43px;
|
||||
font-weight: 400;
|
||||
border: 1px solid #c18948;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
color: #000;
|
||||
font-size: 18px;
|
||||
background-color: transparent;
|
||||
}
|
||||
.edit-modal button.yellow-btn {
|
||||
border: none;
|
||||
height: 44px;
|
||||
}
|
||||
.save span.spinner-border {
|
||||
top: 7px;
|
||||
position: relative;
|
||||
}
|
||||
/*======responsive=====*/
|
||||
|
||||
@media (max-width: 2560px) {
|
||||
|
||||
@@ -20,14 +20,19 @@
|
||||
</div>
|
||||
<div class="iv-form col-md-6 mb-3">
|
||||
<p><label for="phone">Phone Number</label></p>
|
||||
<p><input type="tel" id="contact_number" name="contact_number"
|
||||
<p class="edit-invest-profile"><input type="tel" id="contact_number" readonly
|
||||
name="contact_number"
|
||||
oninput="this.value = this.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1');"
|
||||
value="{{ auth()->guard('users')->user()->contact_number }}" class="iv-input"></p>
|
||||
value="{{ auth()->guard('users')->user()->contact_number }}" class="iv-input">
|
||||
<a class="edit-mobile"><i class="fa-solid fs-5 fa-pen-to-square"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="iv-form col-md-6 mb-3">
|
||||
<p><label for="email">Email Id</label></p>
|
||||
<p><input type="text" id="email" name="email"
|
||||
value="{{ auth()->guard('users')->user()->email }}" class="iv-input"></p>
|
||||
<p class="edit-invest-profile"><input type="text" id="email" name="email"
|
||||
value="{{ auth()->guard('users')->user()->email }}" readonly class="iv-input">
|
||||
<a class="edit-email"><i class="fa-solid fs-5 fa-pen-to-square"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="iv-form col-md-6 mb-3">
|
||||
<p><label for="email">Profile Picture</label></p>
|
||||
@@ -39,7 +44,7 @@
|
||||
<textarea name="address">{{ auth()->guard('users')->user()->address }}</textarea>
|
||||
</div>
|
||||
<div class="iv-form col-md-6 mb-3">
|
||||
<button class="save" id="submit-btn" type="submit">Save</button>
|
||||
<button class="save edit-save-btn" id="submit-btn" type="submit">Save</button>
|
||||
<!--<button class='save d-none' id="loaderBtn">-->
|
||||
<!-- <div class="spinner-border" role="status">-->
|
||||
<!-- <span class="sr-only">Loading...</span>-->
|
||||
@@ -55,6 +60,136 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade edit-modal" id="emailModal" tabindex="-1" role="dialog" aria-labelledby="emailModalTitle"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<form class="w-100" id="update_only_email">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Update Email</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<label for="email">New Email Id</label><br>
|
||||
<input type="email" name="newEmail" id="newEmail" placeholder="Enter email">
|
||||
</div>
|
||||
<div class="modal-footer justify-content-center">
|
||||
<button type="button" class="cancle-btn removeEmail" data-bs-dismiss="modal">Close</button>
|
||||
<button type="submit" class="yellow-btn">Send OTP</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{-- email popup close --}}
|
||||
|
||||
{{-- email verify otp modal --}}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade edit-modal" id="otpModal" tabindex="-1" role="dialog" aria-labelledby="otpModalTitle"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<form class="w-100" id="enter_otp_for_email">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Enter OTP</h5>
|
||||
{{-- <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button> --}}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<label for="email">OTP</label>
|
||||
<input type="number" name="email_otp" id="email_otp">
|
||||
</div>
|
||||
{{-- <p>OTP has been sent to your registered email address. <br>OTP valid for <span
|
||||
id="countdowns-timer"></span> sec</p>
|
||||
<p id="registration_resend_otp" class="regist">Didn't receive any otp? <a href="#"
|
||||
id="resend_registration_otp" class="d-none">Resend OTP</a></p> --}}
|
||||
</div>
|
||||
<div class="modal-footer justify-content-center">
|
||||
{{-- <button type="button" class="cancle-btn removeEmail" data-bs-dismiss="modal">Close</button> --}}
|
||||
<button type="submit" class="yellow-btn">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{-- email otp modal ends --}}
|
||||
|
||||
|
||||
{{-- contact number modal start --}}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade edit-modal" id="contactNumberModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="contactNumberModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<form class="w-100" id="update_only_contact_number">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Update Phone Number</h5>
|
||||
<button type="button" class="btn-close removeMobileNumber" data-bs-dismiss="modal"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<label for="newcontact_number">New Phone Number</label>
|
||||
<input type="tel" name="newcontact_number" id="newcontact_number"
|
||||
placeholder="Enter phone number">
|
||||
</div>
|
||||
<div class="modal-footer justify-content-center">
|
||||
<button type="button" class="cancle-btn removecontact_number"
|
||||
data-bs-dismiss="modal">Close</button>
|
||||
<button type="submit" class="yellow-btn">Send OTP</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{-- mobile popup close --}}
|
||||
|
||||
{{-- mobile verify otp modal --}}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade edit-modal" id="mobileOtpModal" tabindex="-1"
|
||||
role="dialogmobile
|
||||
aria-labelledby="mobileOtpModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<form class="w-100" id="enter_otp_for_contact_number">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Enter OTP</h5>
|
||||
{{-- <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button> --}}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<label for="mobile_otp">OTP</label>
|
||||
<input type="number" name="mobile_otp" id="mobile_otp">
|
||||
</div>
|
||||
{{-- <p>OTP has been sent to your registered email address. <br>OTP valid for <span
|
||||
id="countdowns-timer"></span> sec</p>
|
||||
<p id="registration_resend_otp" class="regist">Didn't receive any otp? <a href="#"
|
||||
id="resend_registration_otp" class="d-none">Resend OTP</a></p> --}}
|
||||
</div>
|
||||
<div class="modal-footer justify-content-center">
|
||||
{{-- <button type="button" class="cancle-btn"
|
||||
data-bs-dismiss="modal">Close</button> --}}
|
||||
<button type="submit" class="yellow-btn">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{-- mobile otp modal ends --}}
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script>
|
||||
@@ -69,28 +204,28 @@
|
||||
// address: true,
|
||||
// maxlength: 10
|
||||
// },
|
||||
email: {
|
||||
email: true,
|
||||
required: true
|
||||
},
|
||||
// email: {
|
||||
// email: true,
|
||||
// required: true
|
||||
// },
|
||||
|
||||
contact_number: {
|
||||
required: true,
|
||||
digits: true,
|
||||
minlength: 10,
|
||||
maxlength: 10,
|
||||
},
|
||||
// contact_number: {
|
||||
// required: true,
|
||||
// digits: true,
|
||||
// minlength: 10,
|
||||
// maxlength: 10,
|
||||
// },
|
||||
},
|
||||
messages: {
|
||||
name: 'Please enter your name',
|
||||
email: 'Please enter your email',
|
||||
// email: 'Please enter your email',
|
||||
address: 'Please enter your address',
|
||||
contact_number: {
|
||||
required: 'Please enter your contact number',
|
||||
digits: 'Please enter digits',
|
||||
minlength: 'Contact Number should be 10 digits',
|
||||
maxlength: 'Contact Number should be 10 digits',
|
||||
},
|
||||
// contact_number: {
|
||||
// required: 'Please enter your contact number',
|
||||
// digits: 'Please enter digits',
|
||||
// minlength: 'Contact Number should be 10 digits',
|
||||
// maxlength: 'Contact Number should be 10 digits',
|
||||
// },
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formData = new FormData(form);
|
||||
@@ -121,5 +256,199 @@
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// open modal if click on edit icon
|
||||
$('.edit-email').click(function() {
|
||||
$('#emailModal').modal('show');
|
||||
})
|
||||
|
||||
// remove text if modal close
|
||||
$('.removeEmail').on('click', function() {
|
||||
$('#newEmail').val('');
|
||||
})
|
||||
|
||||
// open modal if click on edit icon
|
||||
$('.edit-mobile').click(function() {
|
||||
$('#contactNumberModal').modal('show');
|
||||
})
|
||||
|
||||
// remove text if modal close
|
||||
$('.removeMobileNumber').on('click', function() {
|
||||
$('#newcontact_number').val('');
|
||||
})
|
||||
|
||||
// open modal and enter email to send otp
|
||||
$('#update_only_email').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
newEmail: {
|
||||
email: true,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
newEmail: 'Please enter your email',
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formData = new FormData(form);
|
||||
$.ajax({
|
||||
url: "{{ route('send-email-otp') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(result) {
|
||||
if (result.status == 200) {
|
||||
toastr.success(result.message);
|
||||
$('#emailModal').modal('hide');
|
||||
$('#newEmail').val('');
|
||||
$('#otpModal').modal('show');
|
||||
// setTimeout(() => {
|
||||
// location.replace("{{ route('investor-profile') }}");
|
||||
// }, 1000);
|
||||
}
|
||||
if (result.status == 400) {
|
||||
// $('#submit-btn').removeClass('d-none');
|
||||
// $('#loaderBtn').addClass('d-none');
|
||||
toastr.warning(result.message);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// verify otp for email
|
||||
$('#enter_otp_for_email').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
email_otp: {
|
||||
required: true,
|
||||
minlength: 4,
|
||||
maxlength: 4,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
email_otp: 'Please enter OTP',
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formData = new FormData(form);
|
||||
$.ajax({
|
||||
url: "{{ route('update-user-email') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(result) {
|
||||
if (result.status == 200) {
|
||||
toastr.success(result.message);
|
||||
// $('#emailModal').modal('hide');
|
||||
$('#otpModal').modal('hide');
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 3000);
|
||||
}
|
||||
if (result.status == 201) {
|
||||
// $('#submit-btn').removeClass('d-none');
|
||||
// $('#loaderBtn').addClass('d-none');
|
||||
toastr.warning(result.message);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// open modal and enter mobile number to send otp
|
||||
$('#update_only_contact_number').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
// newContact_number: {
|
||||
// email: true,
|
||||
// required: true
|
||||
// },
|
||||
newContact_number: {
|
||||
required: true,
|
||||
digits: true,
|
||||
minlength: 10,
|
||||
maxlength: 10,
|
||||
},
|
||||
},
|
||||
newContact_number: {
|
||||
newEmail: 'Please enter contact number',
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formData = new FormData(form);
|
||||
$.ajax({
|
||||
url: "{{ route('send-otp-mobile') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(result) {
|
||||
if (result.status == 200) {
|
||||
toastr.success(result.message);
|
||||
$('#contactNumberModal').modal('hide');
|
||||
$('#newcontact_number').val('');
|
||||
$('#mobileOtpModal').modal('show');
|
||||
// setTimeout(() => {
|
||||
// location.replace("{{ route('investor-profile') }}");
|
||||
// }, 1000);
|
||||
}
|
||||
if (result.status == 400) {
|
||||
// $('#submit-btn').removeClass('d-none');
|
||||
// $('#loaderBtn').addClass('d-none');
|
||||
toastr.warning(result.message);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
// verify otp for mobile number
|
||||
$('#enter_otp_for_contact_number').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
mobile_otp: {
|
||||
required: true,
|
||||
minlength: 4,
|
||||
maxlength: 4,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
mobile_otp: 'Please enter OTP',
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formData = new FormData(form);
|
||||
$.ajax({
|
||||
url: "{{ route('update-user-contact-number') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(result) {
|
||||
if (result.status == 200) {
|
||||
toastr.success(result.message);
|
||||
// $('#emailModal').modal('hide');
|
||||
$('#mobileOtpModal').modal('hide');
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 3000);
|
||||
}
|
||||
if (result.status == 201) {
|
||||
// $('#submit-btn').removeClass('d-none');
|
||||
// $('#loaderBtn').addClass('d-none');
|
||||
toastr.warning(result.message);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -486,6 +486,10 @@ Route::middleware([FrontendAccess::class])->group(function () {
|
||||
Route::get("investor-profile", [ProfileController::class, 'index'])->name('investor-profile');
|
||||
Route::get("edit-profile", [ProfileController::class, 'edit'])->name('edit-profile');
|
||||
Route::patch("update-user-profile", [ProfileController::class, 'update'])->name('update-user-profile');
|
||||
Route::patch("send-email-otp", [ProfileController::class, 'sendEmailOTP'])->name('send-email-otp');
|
||||
Route::patch("update-user-email", [ProfileController::class, 'updateEmail'])->name('update-user-email');
|
||||
Route::patch("send-otp-mobile", [ProfileController::class, 'sendOTPNumber'])->name('send-otp-mobile');
|
||||
Route::patch("update-user-contact-number", [ProfileController::class, 'updateContactNumber'])->name('update-user-contact-number');
|
||||
|
||||
//Buyer Form
|
||||
Route::controller(MarketPlaceController::class)->group(function () {
|
||||
|
||||
Reference in New Issue
Block a user