PHP code example of nickmel / laravel-smsto

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

    

nickmel / laravel-smsto example snippets


'Nickmel/SMSTo/SMSToServiceProvider',

'SMSTo' => 'Nickmel/SMSTo/SMSToFacade',

SMSTo::getBalance();

$messages = [
    [
        'to' => '+357xxxxxxxx',
        'message' => 'An SMS message'
    ]
];

$senderId = 'SENDERID';

SMSTo::sendSingle($messages, $senderId);

$recipients = ['+357xxxxxxxx', '+357yyyyyyyy'];

$message = 'An SMS message';

$senderId = 'SENDERID';

SMSTo::sendMultiple($message, $recipients, $senderId);

Notifications in Laravel can be send to custom channels.