diff --git a/app/Helpers/helpers.php b/app/Helpers/helpers.php index f9acc9d..b8914d8 100644 --- a/app/Helpers/helpers.php +++ b/app/Helpers/helpers.php @@ -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;', diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 3ab375b..ea2498b 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -53,7 +53,9 @@ class RegisterController extends Controller sendSMSVerification($user->phone); - return to_route('sms-verification'); + return response()->json([ + 'url' => route('sms-verification') + ]); } /** diff --git a/lang/ru.json b/lang/ru.json index a7752f2..34acd15 100644 --- a/lang/ru.json +++ b/lang/ru.json @@ -180,5 +180,7 @@ "Active": "Активный", "Homepage": "Домашняя страница", "Paid": "Оплачено", - "Unpaid": "Не оплачено" + "Unpaid": "Не оплачено", + "Successfully registered": "Успешно зарегистрирован", + "Please, now verify your phone number to continue": "Пожалуйста, подтвердите свой номер телефона, чтобы продолжить." } diff --git a/lang/tk.json b/lang/tk.json index 655439a..3af5b3f 100644 --- a/lang/tk.json +++ b/lang/tk.json @@ -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ň" } diff --git a/resources/views/vendor/nova/pages/register.blade.php b/resources/views/vendor/nova/pages/register.blade.php index b14e8de..8000b59 100644 --- a/resources/views/vendor/nova/pages/register.blade.php +++ b/resources/views/vendor/nova/pages/register.blade.php @@ -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; } @endpush