klobes/laravel-routee-channel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

klobes/laravel-routee-channel

Composer 安装命令:

composer require klobes/laravel-routee-channel

包简介

Notification channel for routee.net

README 文档

README

This package makes it easy to send SMS notifications using routee.net with Laravel 10.0+.

Warning!

Only Routee SMS is implemented at the moment, if you want more channels feel free to write them yourself in RouteeApi or point me to an API wrapper that we can switch to.

Contents

Installation

Install this package with Composer:

composer require klobes/laravel-routee-channel:dev-master

### Setting up the Routee service

Add your Routee application id, application secret and sender id (from) to your `config/services.php`:

```php
// config/services.php
'routee' => [
    'app_id'  => env('ROUTEE_APP_ID'),
    'secret' => env('ROUTEE_SECRET'),
    'from' => env('ROUTEE_SENDER_ID'),
],

Usage

You can use the channel in your via() method inside the notification:

use Illuminate\Notifications\Notification;
use NotificationChannels\Routee\RouteeMessage;
use NotificationChannels\Routee\RouteeChannel;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [RouteeChannel::class];
    }

    public function toRoutee($notifiable)
    {
        return (new RouteeMessage)
            ->content("Your message here");
    }
}

In your notifiable model, make sure to include a routeNotificationForRoutee() method, which returns a phone number or an array of phone numbers.

public function routeNotificationForRoutee()
{
    return $this->phone;
}

Available methods

content(): Set a content of the notification message.

sendAt(): Set a time for scheduling the notification message.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email leo.stratigakis@gmail.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-19