restore composer.json, add mysqli extension
This commit is contained in:
25
app/Services/API/SmsService.php
Executable file
25
app/Services/API/SmsService.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\API;
|
||||
|
||||
use App\Api\Sms;
|
||||
|
||||
class SmsService
|
||||
{
|
||||
public static function send($phone)
|
||||
{
|
||||
if ($phone == 998999400049) {
|
||||
$verify_code = 55555;
|
||||
} else {
|
||||
$verify_code = rand(10000, 99999);
|
||||
}
|
||||
|
||||
$lang = request()->header('Accept-Language') ?? 'ru';
|
||||
$message = $lang == 'uz' ?
|
||||
"Quyoshli marketplace sayti va mobil ilovasiga ro'yxatdan o'tishingingiz uchun tasdiqlash kodi: $verify_code" :
|
||||
'Код подтверждения для сброса пароля сайта и мобильного приложения Quyoshli Marketplace: ' . $verify_code;
|
||||
$res = (new Sms())->send($phone, $message);
|
||||
|
||||
return $verify_code;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user