This package makes it easy to send sms via ISMS bulk SMS Service (Bangladesh) from SSL Wireless Company, with Laravel 5.5+, 6.x and 7.x.
You can install the package via composer:
composer require dgvai/laravel-notification-channel-ismsAdd your ISMS Account credentials to your config/services.php:
// config/services.php
...
'isms' => [
'token' => env('ISMS_TOKEN'), // The API-TOKEN generated from ISMS panel
'sid' => env('ISMS_SID'), // The SID of your stakeholder
],
...In order to let your Notification know which phone are you sending to, the channel will look for the mobile_number attribute of the Notifiable model (eg. User model). If you want to override this behaviour, add the routeNotificationForISMS method to your Notifiable model.
public function routeNotificationForISMS()
{
return '+1234567890';
}Now you can use the channel in your via() method inside the notification:
use DGvai\ISMS\ISMS;
use DGvai\ISMS\ISMSChannel;
use Illuminate\Notifications\Notification;
class OrderPlaced extends Notification
{
public function via($notifiable)
{
return [ISMSChannel::class];
}
public function toISMS($notifiable)
{
return new ISMS('Your order has been placed!');
}
}Please see CHANGELOG for more information what has changed recently.
The MIT License (MIT). Please see License File for more information.