sushantaryal/sparrow-notification-channel
最新稳定版本:1.1.2
Composer 安装命令:
composer require sushantaryal/sparrow-notification-channel
包简介
Sparrow SMS Notification Channel for laravel.
README 文档
README
Installation
You can install the package via Composer:
$ composer require sushantaryal/sparrow-notification-channel
Configuration
Add your Sparrow Token, and From identity to your .env:
SPARROW_SMS_TOKEN=ABCD #always required SPARROW_SMS_FROM=identity #always required
Advanced configuration
Run
php artisan vendor:publish --provider="Sushant\SparrowSmsNotification\SparrowSmsServiceProvider"
/config/sparrow-sms.php
Usage
Now you can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification; use Sushant\SparrowSmsNotification\SparrowMessage; class VerifyOtp extends Notification { public function via($notifiable) { return ['sparrowsms']; } public function toSparrowSms($notifiable) { return (new SparrowMessage) ->content('Your OTP code is 12345.'); } }
Available Message methods
SparrowMessage
from(''): Accepts a identity provided to you.content(''): Accepts a string value for the notification body.configuration.
License
Sparrow SMS notifications channel is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-14