承接 sushantaryal/sparrow-notification-channel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-14