PHP code example of sachinkiranti / sparrow-sms

1. Go to this page and download the library: Download sachinkiranti/sparrow-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/ */

    

sachinkiranti / sparrow-sms example snippets


'providers' => [
    // ...
    SachinKiranti\SparrowSms\SparrowSmsServiceProvider::class,
];

// $recipients can be array of phone number or a single phone number
 (new SparrowSms(98xxxxxxxx, "Hello From sachinkiranti/sparrow-sms repo."))->send()
//  or sending to multiple phone number
 (new SparrowSms([98xxxxxxxx, 98xxxxxxxx], "Hello From sachinkiranti/sparrow-sms repo."))->send()

 (new SparrowSms(null, null))->credit() // Available Credits : 1000

// Single recipient
 send_sparrow_sms (98xxxxxxxx, "Hello From sachinkiranti/sparrow-sms repo.");
// Or multiple recipients
 send_sparrow_sms ([98xxxxxxxx, 98xxxxxxxx], "Hello From sachinkiranti/sparrow-sms repo.");

 get_sparrow_sms_credit(); // Available Credits : 1000

php artisan vendor:publish --tag=sparrow-sms