PHP code example of romanstruk / smsnotify

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

    

romanstruk / smsnotify example snippets


SmsNotifyFacade::to(new PhoneNumber('0666000000', 'UA'))
                ->send(new SmsMessage('Some sms text'));

$smsNotify = app(SmsNotifyInterface::class);
$smsNotify->to(new PhoneNumber('0666000000', 'UA'))
          ->send(new SmsMessage('Some sms text'));

SmsNotifyFacade::clientMap(function (){
                    return 'ua';
                })
                ->to(new PhoneNumber('0666000000', 'UA'))
                ->send(new SmsMessage('Some text'));

...
'map' => [
    'ua' => 'log',
    'by' => 'mts-communicator'
]
...
bash
php artisan vendor:publish RomanStruk\SmsNotify\SmsNotifyServiceProvider
config/smsnotify.php
config/smsnotify.php