PHP code example of kolirt / laravel-sms

1. Go to this page and download the library: Download kolirt/laravel-sms library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kolirt / laravel-sms example snippets


'turbosms' => [
    'login' => env('SMS_TURBOSMS_LOGIN'),
    'password' => env('SMS_TURBOSMS_PASSWORD'),
    'sender' => env('SMS_TURBOSMS_SENDER'),
    'package' => \Kolirt\Sms\Packages\TurboSms::class
],

$message = Kolirt\Sms\Facades\Sms::driver('turbosms')->send('380900000000', $message);

// OR

$messages = Kolirt\Sms\Facades\Sms::driver('turbosms')->send(['380900000000', '380900000001'], $message);

$message = Kolirt\Sms\Facades\Sms::driver('turbosms')->status($message_id);

$message = Kolirt\Sms\Facades\Sms::driver('turbosms')->balance();

'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
],

$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->send('380900000000', $message);

// OR

$messages = Kolirt\Sms\Facades\Sms::driver('sigmasms')->send(['380900000000', '380900000001'], $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);

$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);

$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendVk('380900000000', $text);

// OR

$messages = Kolirt\Sms\Facades\Sms::driver('sigmasms')->sendVk(['380900000000', '380900000001'], $text);

$message = Kolirt\Sms\Facades\Sms::driver('sigmasms')->status($message_id);

'smsc' => [
    'login' => env('SMS_SMSC_LOGIN'),
    'password' => env('SMS_SMSC_PASSWORD'),
    'sender' => env('SMS_SMSC_SENDER'),
    'time' => 0,
    'package' => \Kolirt\Sms\Packages\Smsc::class
],

$message = Kolirt\Sms\Facades\Sms::driver('smsc')->send('380900000000', $message);

// OR

$messages = Kolirt\Sms\Facades\Sms::driver('smsc')->send(['380900000000', '380900000001'], $message);

$message = Kolirt\Sms\Facades\Sms::driver('smsc')->status($recepient, $message_id);

$message = Kolirt\Sms\Facades\Sms::driver('smsc')->balance();

$ php artisan sms:install