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) function sendSMS(string|int $phone, string|int $message)
{ {
if (! app()->isProduction()) {
return;
}
$client = new Client(); $client = new Client();
$headers = [ $headers = [
'Content-Type' => 'application/json;charset=utf-8;', 'Content-Type' => 'application/json;charset=utf-8;',

View File

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

View File

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

View File

@@ -281,5 +281,7 @@
"Paid": "Tölenen", "Paid": "Tölenen",
"Unpaid": "Tölenmedik", "Unpaid": "Tölenmedik",
"Clients": "Müşderiler", "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() removeValidationClasess()
await Swal.fire({ await Swal.fire({
title: '{{ __('Successfully logged in') }}', title: '{{ __('Successfully registered') }}',
text: '{{ __('Please wait while we redirect you to your personal account') }}', text: '{{ __('Please, now verify your phone number to continue') }}',
icon: 'success', icon: 'success',
showDenyButton: false, showDenyButton: false,
showCancelButton: false, showCancelButton: false,
}) })
window.location.href = '{{ route('login') }}' window.location.href = response.url;
} }
</script> </script>
@endpush @endpush