Последняя версия с сервера прошлого разработчика

This commit is contained in:
2025-07-10 04:35:51 +00:00
commit c731570032
1174 changed files with 134314 additions and 0 deletions

39
app/Support/Sms/SmsRu.php Executable file
View File

@@ -0,0 +1,39 @@
<?php
namespace App\Support\Sms;
use GuzzleHttp\Client;
class SmsRu implements SmsApi
{
private $appId;
private $url;
private $client;
public function __construct($appId, $url = 'https://sms.ru/sms/send')
{
if (empty($appId)) {
throw new \InvalidArgumentException('Sms appId must be set.');
}
$this->appId = $appId;
$this->url = $url;
$this->client = new Client();
}
public function sendText($number, $text): void
{
$this->client->post($this->url, [
'form_params' => [
'api_id' => $this->appId,
'to' => '+' . trim($number, '+'),
'text' => $text
],
]);
}
public function sendCall($number, $ip): void
{
}
}