Update user registration email format, remove unused SMS helper function, and adjust database migration for user meta column
This commit is contained in:
@@ -6,10 +6,8 @@ use App\Modules\ModuleContract;
|
||||
use App\Modules\ModuleRepository;
|
||||
use App\Modules\TurkmenNumberFormatter\Repositories\TurkmenNumberFormatter;
|
||||
use Illuminate\Contracts\Cache\Repository as CacheRepository;
|
||||
use Illuminate\Http\Client\PendingRequest;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
@@ -108,29 +106,3 @@ function moneyFormatInTurkmenLetter(int|float|string $money): string
|
||||
{
|
||||
return TurkmenNumberFormatter::format(floatval($money));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a sms
|
||||
*/
|
||||
function sendSMS(string|int $phone, string|int $message): mixed
|
||||
{
|
||||
$response = Http::retry(
|
||||
times: 3,
|
||||
sleepMilliseconds: 50,
|
||||
throw: false,
|
||||
when: function (Exception $exception, PendingRequest $request) {
|
||||
Log::channel('sms_api_error')
|
||||
->error('Exception: ', [
|
||||
'message' => $exception->getMessage(),
|
||||
'line' => $exception->getLine(),
|
||||
]);
|
||||
|
||||
return true;
|
||||
})
|
||||
->post('http://216.250.14.144:3000/api/data', [
|
||||
'phone' => '+993'.$phone,
|
||||
'code' => $message,
|
||||
]);
|
||||
|
||||
return $response->body();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user