$exception->getMessage(), 'line' => $exception->getLine(), ]); return true; } ) ->post('http://216.250.14.144:3000/api/data', [ 'phone' => '+993' . $phone, 'code' => $message, ]); return $response->body(); } } if (! function_exists('unmask_phone')) { /** * Unmask Turkmenistan phone number from TM code +993 6X XX XX XX to 6xxxxxxx */ function unmask_phone(string $phone): string { // Keep digits only $digits = preg_replace('/\D+/', '', $phone); // Remove Turkmenistan country code if present if (str_starts_with($digits, '993')) { $digits = substr($digits, 3); } // Return only valid 8-digit TM mobile number if (preg_match('/^6\d{7}$/', $digits)) { return $digits; } return ''; } }