PHP code example of moffhub / sms-handler

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

    

moffhub / sms-handler example snippets


use Moffhub\SmsLib\SmsLib;

$sms = new SmsLib();

$sms->sendSms('0700000000', 'Hello World');

$sms->sendScheduledSms('0700000000', 'Hello World', '2024-12-12 12:00');

use Moffhub\SmsLib\SendSms;

SendSms::sendSms('0700000000', 'Hello World');

SendSms::sendScheduledSms('0700000000', 'Hello World', '2024-12-12 12:00');
bash
php artisan vendor:publish --provider="Moffhub\SmsLib\SmsLibServiceProvider" --tag="config"