LaravelPackages.net
Acme Inc.
Toggle sidebar
nickmel/laravel-smsto

A Laravel package to hook up to the SMS.to REST API

24
0
1.1.0
About nickmel/laravel-smsto

nickmel/laravel-smsto is a Laravel package for a laravel package to hook up to the sms.to rest api. It currently has 0 GitHub stars and 24 downloads on Packagist (latest version 1.1.0). Install it with composer require nickmel/laravel-smsto. Discover more Laravel packages by nickmel or browse all Laravel packages to compare alternatives.

Last updated

Latest Stable Version Build Status License Total Downloads

SMS.to library for Laravel 5.8

Laravel package to provide integration with SMS.to REST API. Visit https://sms.to/ to create an account and obtain API credentials.

Installation

Install this package with composer:

composer require nickmel/laravel-smsto

Add the provider to the providers array in config/app.php file

'Nickmel/SMSTo/SMSToServiceProvider',

and the facade in the aliases array in config/app.php file

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

Copy the config files for the API

php artisan vendor:publish --tag="laravel-sms-to" 

Usage

To configure the API, either set the variables in the .env file or edit the published config/laravel-sms-to.php file directly.


Get Account Balance
SMSTo::getBalance();
Send single SMS
$messages = [
    [
        'to' => '+357xxxxxxxx',
        'message' => 'An SMS message'
    ]
];

$senderId = 'SENDERID';

SMSTo::sendSingle($messages, $senderId);
Send multiple SMS
$recipients = ['+357xxxxxxxx', '+357yyyyyyyy'];

$message = 'An SMS message';

$senderId = 'SENDERID';

SMSTo::sendMultiple($message, $recipients, $senderId);
Using the Notification channel
Notifications in Laravel can be send to custom channels.

Star History Chart