mrhmh/sms-rahyab
Composer 安装命令:
composer require mrhmh/sms-rahyab
包简介
README 文档
README
This package makes it easy to send notifications using sms.rahyab.ir.
Installation
Install this package with Composer:
composer require mrhmh/sms-rahyab
Setting up the Rahyab service
Add your Rahyab credential to config/services.php:
// config/services.php ... 'sms_rahyab' => [ 'company' => env('SMS_RAHYAB_COMPANY'), 'host' => env('SMS_RAHYAB_HOST'), 'port' => env('SMS_RAHYAB_PORT'), 'username' => env('SMS_RAHYAB_USERNAME'), 'password' => env('SMS_RAHYAB_PASSWORD'), 'sender' => env('SMS_RAHYAB_SENDER'), 'token' => env('SMS_RAHYAB_TOKEN'), ], ...
Usage
You can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification; use MrHMH\SmsRahyab\SmsRahyabChannel; use MrHMH\SmsRahyab\SmsRahyabMessage; class AccountApproved extends Notification { public function via($notifiable) { return [SmsRahyabChannel::class]; } public function toSmsRahyab($notifiable) { return SmsRahyabMessage::create("Task #{$notifiable->id} is complete!"); } }
In your notifiable model, make sure to include a routeNotificationForSmsrahyab() method, which return a phone number.
public function routeNotificationForSmsrahyab() { return $this->mobile; }
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 57
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-03-31