burakaktna/laravel-vatansms
最新稳定版本:1.0.2
Composer 安装命令:
composer require burakaktna/laravel-vatansms
包简介
Laravel Custom Notification Channel For VatanSMS
README 文档
README
This package makes it easy to send sms notifications with VatanSMS on Laravel.
Installation
You can install the package via composer:
composer require burakaktna/laravel-vatansms
Configuration
VATANSMS_CUSTOMER_NO=YOUR VATANSMS CUSTOMER NO VATANSMS_USERNAME=YOUR VATANSMS USERNAME VATANSMS_PASSWORD=YOUR VATANSMS PASSWORD VATANSMS_ORIGINATOR=YOUR VATANSMS ORIGINATOR
Advanced configuration
Run php artisan vendor:publish --provider="Burakaktna\LaravelVatanSMS\VatanSMSServiceProvider"
/config/vatansms.php
Usage
Now you can use the channel in your via() method inside the notification:
use Burakaktna\LaravelVatanSMS\VatanSMSChannel; use Burakaktna\LaravelVatanSMS\VatanSMSMessage; use Illuminate\Notifications\Notification; class AccountApproved extends Notification { public function via($notifiable) { return [VatanSMSChannel::class]; } public function toVatanSMS($notifiable) { return (new VatanSMSMessage()) ->content("Your {$notifiable->service} account was approved!"); } }
You can also send sms with facades:
use Burakaktna\LaravelVatanSMS\Facades\VatanSMS; function sendSms(string $content, array $number){ VatanSMS::sendSms($content, $number)->submit(); }
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email burak@leafletsoft.com.tr instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 77
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-26