This package makes it easy to send notifications using smsaero.ru with Laravel 5.3
cazzzt/laravel-notification-smsaero is a Laravel package for this package makes it easy to send notifications using smsaero.ru with laravel 5.3.
It currently has 0 GitHub stars and 754 downloads on Packagist.
Install it with composer require cazzzt/laravel-notification-smsaero.
Discover more Laravel packages by cazzzt
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to send notifications using smsaero.ru with Laravel 5.3.
Require this package in your composer.json and run composer update
"cazzzt/laravel-notification-smsaero": "@dev"
Then you must install the service provider:
// config/app.php
'providers' => [
...
Cazzzt\SmsAero\SmsAeroServiceProvider::class,
],
Add your SmsAero login, secret key (hashed password), default sign and send channel to your config/services.php:
// config/services.php
...
'smsaero' => [
'user' => env('SMSAERO_USER'),
'secret' => env('SMSAERO_SECRET'),
'sign' => env('SMSAERO_SIGN'),
'digital' => env('SMSAERO_DIGITAL'),
],
...
You can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification;
use Cazzzt\SmsAero\SmsAeroMessage;
use Cazzzt\SmsAero\SmsAeroChannel;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [SmsAeroChannel::class];
}
public function toSmsAero($notifiable)
{
return (new SmsAeroMessage())
->content('Task #{$notifiable->id} is complete!');
}
}
from(): Sets the sender's name or phone number.
content(): Sets a content of the notification message.
Comming soon..
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT).