laraketai/mobizon 问题修复 & 功能扩展

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

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

laraketai/mobizon

最新稳定版本:v1.08

Composer 安装命令:

composer require laraketai/mobizon

包简介

Mobizon SMS notifications driver for Laravel

README 文档

README

Latest Version on Packagist Software License StyleCI Total Downloads

This package makes it easy to send SMS notifications using Mobizon with Laravel 5.3.

Contents

Installation

You can install this package via composer:

composer require laraketai/mobizon

Laravel 5.5 < Add the service provider to config/app.php:

// config/app.php
'providers' => [
    ...
    Laraketai\Mobizon\MobizonServiceProvider::class,
],

Publish Config File config/mobizon.php:

php artisan vendor:publish --provider="Laraketai\Mobizon\MobizonServiceProvider"

Setting up your Mobizon service

Log in to your Mobizon and grab your Api, Api Secret Key. Add them to config/services.php.

// config/mobizon.php
...
'mobizon' => [
    'alphaname' => null, //Optional, if you don't have registered alphaname, just skip this param and your message will be sent with our free common alphaname.
    'secret' => env('MOBIZON_APP_KEY'), // Your secret API key
],

Usage

Follow Laravel's documentation to add the channel your Notification class:

use Illuminate\Notifications\Notification;
use Laraketai\Mobizon\MobizonChannel;
use Laraketai\Mobizon\MobizonMessage;

public function via($notifiable)
{
    return [MobizonChannel::class];
}

public function toMobizon($notifiable)
{
    return MobizonMessage::create("Task #{$notifiable->id} is complete!");
}

Add a routeNotificationForMobizon method to your Notifiable model to return the phone number:

public function routeNotificationForMobizon()
{
    //Phone Number without symbols or spaces
    return $this->phone_number;
}

Available methods

  • content() - (string), SMS notification body

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email sanzhar@aketai.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.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-03