umuttaymaz / laravel-notification-verimor
Verimor SMS for Laravel Notifications
Requires
- php: >=5.6.4
- illuminate/notifications: ^5.3
- illuminate/support: ^5.1|^5.2|^5.3
Requires (Dev)
- mockery/mockery: ^0.9.5
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2020-01-24 17:39:15 UTC
README
This package makes it easy to send notifications using VerimorSMS with Laravel 5.3+.
Contents
Installation
You can install the package via composer:
composer require umuttaymaz/laravel-notification-verimor
Then you must install the service provider:
// config/app.php 'providers' => [ ... UmutTaymaz\VerimorSMS\VerimorSMSServiceProvider::class, ],
Setting up the VerimorSMS service
Add your Verimor username, password and default sender name to your .env
:
VERIMOR_USERNAME=username
VERIMOR_PASSWORD=apiPassword
VERIMOR_HEADER=verifiedHeader
Usage
You can use the channel in your via()
method inside the notification:
use Illuminate\Notifications\Notification; use NotificationChannels\SmscRu\SmscRuMessage; use NotificationChannels\SmscRu\SmscRuChannel; class AccountApproved extends Notification { public function via($notifiable) { return [VerimorSMSChannel::class]; } public function toVerimor($notifiable) { return VerimorSMSMessage::create('This is notification message'); } }
In your notifiable model, make sure to include a routeNotificationForVerimor() method, which return the phone number.
public function routeNotificationForVerimor() { return $this->phone; }
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email umut@kreator.com.tr instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.