add register page

This commit is contained in:
2024-07-28 15:26:09 +05:00
parent 74011d9eab
commit 9d65fa72b6
5 changed files with 16 additions and 6 deletions

View File

@@ -49,6 +49,10 @@ function unMaskPhone(string|int $phone): string
*/
function sendSMS(string|int $phone, string|int $message)
{
if (! app()->isProduction()) {
return;
}
$client = new Client();
$headers = [
'Content-Type' => 'application/json;charset=utf-8;',

View File

@@ -53,7 +53,9 @@ class RegisterController extends Controller
sendSMSVerification($user->phone);
return to_route('sms-verification');
return response()->json([
'url' => route('sms-verification')
]);
}
/**

View File

@@ -180,5 +180,7 @@
"Active": "Активный",
"Homepage": "Домашняя страница",
"Paid": "Оплачено",
"Unpaid": "Не оплачено"
"Unpaid": "Не оплачено",
"Successfully registered": "Успешно зарегистрирован",
"Please, now verify your phone number to continue": "Пожалуйста, подтвердите свой номер телефона, чтобы продолжить."
}

View File

@@ -281,5 +281,7 @@
"Paid": "Tölenen",
"Unpaid": "Tölenmedik",
"Clients": "Müşderiler",
"Client": "Müşderi"
"Client": "Müşderi",
"Successfully registered": "Üstünlikli hasaba alyndyňyz",
"Please, now verify your phone number to continue": "Dowam etmek üçin telefon belgiňizi tassyklaň"
}

View File

@@ -14,14 +14,14 @@ async function register(event) {
removeValidationClasess()
await Swal.fire({
title: '{{ __('Successfully logged in') }}',
text: '{{ __('Please wait while we redirect you to your personal account') }}',
title: '{{ __('Successfully registered') }}',
text: '{{ __('Please, now verify your phone number to continue') }}',
icon: 'success',
showDenyButton: false,
showCancelButton: false,
})
window.location.href = '{{ route('login') }}'
window.location.href = response.url;
}
</script>
@endpush