PHP code example of patricpoba / mnotify

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

    

patricpoba / mnotify example snippets


PatricPoba\Mnotify\MnotifyServiceProvider::class, 

'Sms'  => PatricPoba\Mnotify\Facades\Sms::class,
 
 
# Basic sending(uses api_key set in .env file)
Sms::send('02XXXXXXXXX', 'Testing test');

# To use a different api key,
Sms::setApiKey('API_KEY_GOES_HERE')->send('0275799028', 'Testing App');

# To customise sender Id,
# NB: sender Id must not be more than 11 characters
Sms::from('CompanyName')->send('02XXXXXXXX', 'Testing App');

 
$dateTime = \Carbon\Carbon::now()->addMinutes(30); // format: 2017-05-02 00:59:00

Smd::schedule($dateTime, '0275799028', 'Testing Application')

 
Sms::balance();

# To check the balance using an api key different from the one set in the .env file,
Sms::setApiKey('API_KEY_GOES_HERE')->balance();