Files
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

22 lines
666 B
PHP

<?php
namespace Modules\MarketingAddon\App\SmsGateways;
use Illuminate\Support\Facades\Http;
class HaDavar
{
public static function send_message($gateway, $numbers, $contents, $sender_name = null)
{
$response = Http::asForm()->{$gateway->params['api_method']}($gateway->params['api_url'], array_merge([
'Username' => $gateway->params['username'],
'Token' => $gateway->params['token'],
'Sender' => $sender_name ?? $gateway->params['sender'],
$gateway->params['number_key'] => $numbers,
$gateway->params['message_key'] => $contents,
]));
return $response->body();
}
}