davidcb / laravel-esendex
Laravel wrapper for Esendex
Installs: 12 595
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: ^7.3|^8.0
- esendex/sdk: 2.*.*
- illuminate/support: ^8.0
README
Laravel 5 wrapper for Esendex SMS
Installation
Install via Composer:
composer require davidcb/laravel-esendex
If you're using Laravel >= 5.5, you can skip this as this package will be auto-discovered.
Add the service provider to config/app.php
Davidcb\Esendex\EsendexServiceProvider::class,
You can register the facade in the aliases
array in the config/app.php
file
'Esendex' => Davidcb\Esendex\Facades\Esendex::class,
Publish the config file
$ php artisan vendor:publish --provider="Davidcb\Esendex\EsendexServiceProvider"
Set your API key and Client ID on your .env file
ESENDEX_ACCOUNT=EX000000
ESENDEX_EMAIL=user@example.com
ESENDEX_PASSWORD=secret
Usage
You can find all the methods in the original esendex/esendex-php-sdk package.
Examples:
// Send an SMS $result = LaravelEsendex::send('Sender', '555000000', 'This is the text of the SMS');
// Retrieve inbox messages $messages = LaravelEsendex::latest();
// Get a message's status $status = LaravelEsendex::messageStatus('123456');
// Get a message's body $body = LaravelEsendex::getMessageBodyById('123456');