maximof/laravel-messager is a Laravel package for :package_description.
It currently has 0 GitHub stars and 8 downloads on Packagist (latest version 1.1.2).
Install it with composer require maximof/laravel-messager.
Discover more Laravel packages by maximof
or browse all Laravel packages to compare alternatives.
Last updated
This is a wrapper for a few sms service providers in Nigeria. This package is meant just for laravel so feel free to install in your app to extend its capablilities. Take a look at contributing.md to see a to do list.
Via Composer
$ composer require maximof/laravel-messager
This is a fairly easy package to implement. This package works strictly on Laravel 7 and upwards. As Laravel implements package autodiscovery from Laravel 5+ you do not need to add the provider to Laravel's provider array. Publish the config file by running
$ php artisan vendor:publish --provider="Maximof\LaravelMessager\LaravelMessagerServiceProvider"
After you have published the config file, set your environmental variables.
| Variable | Description | | ----------- | ----------- | | SMS_SENDER | set the sms sender | | BULK_SMS_NIGERIA_TOKEN | set the bulk sms Nigeria api token | | SMART_SMS_SOLUTIONS_TOKEN | set the smart sms solutions api token |
To generate an API token, for Smart sms solutions visit this link, you can do this only after registering on their site here.
To generate an API for Bulk sms Nigeria visit this link. Remember also to register here
Only two service providers have been implemented in this package
| Service Provider | Description | | ----------------- | ----------- | | Smartsmssolutions API | this is the API for www.smartsmssolutions.com. To get an api token head to Smart Sms Solutions to get one | | Bulksmsnigeria API | this is the API for www.bulksmsnigeria.com. To understand how the process works on their end head over to Bulk Sms Nigeria |
To send messages you can just pull in the class in your code like this
$sms = new BulkSmsNigeria();
$sms->to(08105612094)->from("Maximof")->body("Hello!");
//this will return a true value if the message is successfully sent or will throw an exception if an error occurs
To check your sms units balance
$sms = new SmartSmsSolution();
$sms->balance();
//this returns a string containing the sms units balance
//this only works for the SmartSmsSolutions class as the BulkSmsNigeria class api has no balance checking endpoint
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
MIT. Please see the license file for more information.