hsmfawaz / enjaz-sms
Enjaz Sms service provider wrapper with notification channel support
dev-master
2020-12-10 17:06 UTC
Requires (Dev)
- guzzlehttp/guzzle: ^6.5.5|^7.0.1
- illuminate/http: ^8.x-dev
- laravel/legacy-factories: dev-master
- mockery/mockery: ^1.0@dev
- orchestra/testbench: ^6.0@dev
- phpunit/phpunit: ^8.4@dev
- symfony/thanks: ^1.0
This package is auto-updated.
Last update: 2024-04-11 00:38:15 UTC
README
Install
composer require hsmfawaz/enjaz-sms
Configuration
Follow the following instructions to install the package successfully
.env
ENJAZ_USERNAME='XXX'
ENJAZ_PASSWORD='XXX'
ENJAZ_SENDER='XXX'
if you want to publish the config
php artisan vendor:publish --provider="HsmFawaz\EnjazSms\EnjazSmsServiceProvider"
--tag="config"
Usage
You can use the class to send directly
use \Hsmfawaz\EnjazSms\EnjazSms; $client = new EnjazSms(); $result = $client->to(['+9665XXXXXXX','9665XXXXXXX'])->send('Your message here'); //you will get array from parsed request body
or you can use the channel for notifications support
//Example app/Notifications/RecoveryCodeNotification.php use \Hsmfawaz\EnjazSms\EnjazSmsChannel; public function via($notifiable) { return [EnjazSmsChannel::class]; } public function toEnjazSms($notifiable) { return [ 'phone' => 'phone number', 'body' =>'message', ]; }
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email hsm.fawaz@gmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.