toshiyoung / laravel-smsru-channel
Sms.ru Notification Channel for laravel.
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/toshiyoung/laravel-smsru-channel
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- orchestra/testbench: ^7.5
- phpunit/phpunit: ^9.5
README
Install
composer require toshiyoung/laravel-smsru-channel
php artisan vendor:publish --provider="TY\SmsRu\SmsRuServiceProvider"
Usage
You can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification; use TY\SmsRu\Messages\SmscRuMessage; use TY\SmsRu\Channels\SmscRuChannel; class SmsNotify extends Notification { public function via($notifiable) { return [SmsRuChannel::class]; } public function toSmsRu($notifiable) { return new SmsRuMessage("Привет! Это тестовое СМС."); } }
Notification::route('sms_ru', '79001231234')->notify(new SmsNotify());
Testing
$ composer test