Initial commit

This commit is contained in:
Developer
2025-04-21 16:03:20 +02:00
commit 2832896157
22874 changed files with 3092801 additions and 0 deletions

39
app/Support/Sms/SmsRu.php Normal 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
{
}
}