kolirt / laravel-sms
Sms driver for laravel.
1.0.7
2023-07-27 14:03 UTC
Requires
- guzzlehttp/guzzle: > 6.0.0
This package is auto-updated.
Last update: 2025-03-27 18:05:33 UTC
README
Installation
$ composer require kolirt/laravel-sms
$ php artisan sms:install
Usage
All available drivers
Turbosms
Configure for config/service.php
'turbosms' => [ 'login' => env('SMS_TURBOSMS_LOGIN'), 'password' => env('SMS_TURBOSMS_PASSWORD'), 'sender' => env('SMS_TURBOSMS_SENDER'), 'package' => \Kolirt\Sms\Packages\TurboSms::class ],
Send message
$message = Kolirt\Sms\Facades\Sms::driver('turbosms')->send('380900000000', $message); // OR $messages = Kolirt\Sms\Facades\Sms::driver('turbosms')->send(['380900000000', '380900000001'], $message);
Get status
$message = Kolirt\Sms\Facades\Sms::driver('turbosms')->status($message_id);
Get balance
$message = Kolirt\Sms\Facades\Sms::driver('turbosms')->balance();
Sigmasms
Configure for config/service.php
'sigmasms' => [ 'login' => env('SMS_TURBOSMS_LOGIN'), 'password' => env('SMS_TURBOSMS_PASSWORD'), 'time_cache' => 21600, 'sender' => [ 'sms' => env('SMS_TURBOSMS_SENDER_SMS'), 'viber' => env('SMS_TURBOSMS_SENDER_VIBER'), 'vk' => env('SMS_TURBOSMS_SENDER_VK'), 'whats_app' => env('SMS_TURBOSMS_SENDER_WHATS_APP') ], 'package' => \Kolirt\Sms\Packages\SigmaSms::class ],
Send message
$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->send('380900000000', $message); // OR $messages = Kolirt\Sms\Facades\Sms::driver('sigmasms')->send(['380900000000', '380900000001'], $message);
Send Viber message
$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendViber('380900000000', $text, $image = null, $button_text = null, $button_url = null); // OR $messages = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendViber(['380900000000', '380900000001'], $text, $image = null, $button_text = null, $button_url = null);
Send WhatsApp message
$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendWhatsApp('380900000000', $text, $image = null); // OR $messages = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendWhatsApp(['380900000000', '380900000001'], $text, $image = null);
Send VK message
$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendVk('380900000000', $text); // OR $messages = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendVk(['380900000000', '380900000001'], $text);
Get status
$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->status($message_id);
Smsc
Configure for config/service.php
'smsc' => [ 'login' => env('SMS_SMSC_LOGIN'), 'password' => env('SMS_SMSC_PASSWORD'), 'sender' => env('SMS_SMSC_SENDER'), 'time' => 0, 'package' => \Kolirt\Sms\Packages\Smsc::class ],
Send message
$message = Kolirt\Sms\Facades\Sms::driver('smsc')->send('380900000000', $message); // OR $messages = Kolirt\Sms\Facades\Sms::driver('smsc')->send(['380900000000', '380900000001'], $message);
Get status
$message = Kolirt\Sms\Facades\Sms::driver('smsc')->status($recepient, $message_id);
Get balance
$message = Kolirt\Sms\Facades\Sms::driver('smsc')->balance();