composer require hsmfawaz/enjaz-sms
Follow the following instructions to install the package successfully
ENJAZ_USERNAME='XXX'
ENJAZ_PASSWORD='XXX'
ENJAZ_SENDER='XXX'
php artisan vendor:publish --provider="HsmFawaz\EnjazSms\EnjazSmsServiceProvider"
--tag="config"
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',
];
}
Please see CONTRIBUTING for details.
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.