Файловый менеджер - Редактировать - /home/clickysoft/public_html/jmapi5.clickysoft.net/Channels.zip
Назад
PK Q?�Z��� � Messages/SMS.phpnu �[��� <?php namespace App\Channels\Messages; class SMS { public $content; public function content($content): static { $this->content = $content; return $this; } } PK Q?�Z<��@ SMSChannel.phpnu �[��� <?php namespace App\Channels; use Brevo\Client\Api\TransactionalSMSApi; use Brevo\Client\Configuration; use Brevo\Client\Model\SendSms; use Brevo\Client\Model\SendTransacSms; use GuzzleHttp\Client; use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Log; class SMSChannel { public function send($notifiable, Notification $notification): bool|SendSms { $message = $notification->toSms($notifiable); if(!$message) { return false; } $to = $notifiable->routeNotificationFor('Sms'); $apiKey = config('app.brevo_api_key'); $sender = config('app.brevo_sms_sender'); $config = Configuration::getDefaultConfiguration()->setApiKey('api-key', $apiKey); $apiInstance = new TransactionalSMSApi( new Client(), $config ); $sendTransacSms = new SendTransacSms(); $sendTransacSms->setSender($sender); $sendTransacSms->setRecipient($to); $sendTransacSms->setContent($message->content); try { return $apiInstance->sendTransacSms($sendTransacSms); } catch (\Exception $e) { Log::info('SMS failure : '. $to); Log::info($e->getMessage()); return false; } } } PK Q?�Z��� � Messages/SMS.phpnu �[��� PK Q?�Z<��@ SMSChannel.phpnu �[��� PK � I
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка