定制 zizou86/laravel-unifonic 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

zizou86/laravel-unifonic

最新稳定版本:v1.2

Composer 安装命令:

composer require zizou86/laravel-unifonic

包简介

Package to use Unifonic API

README 文档

README

Start send sms with Unifonic right away using your favorite PHP framework.

Installation

composer require zizou86/laravel-unifonic.

Add the service provider to your config/app.php:

'providers' => [

    Zizou86\Unifonic\UnifonicServiceProvider::class,
    
],

...run php artisan vendor:publish to copy the config file.

Edit the config/unifonic.php or add Unifonic app id in your .env file

UNIFONIC_APPS_ID={YOUR_DEFAULT_APP_ID}

Add the alias to your config/app.php:

'aliases' => [
           
    'Unifonic' => Zizou86\Unifonic\Unifonic::class,
           
],

Usage

Please refer to the Api Documentation for more info, or read the docblocks !

use Zizou86\Unifonic\Unifonic;

// messages API methods
Unifonic::send(int $recipient,string $message);
Unifonic::sendBulk(array $recipient, string $message);
Unifonic::getMessageIDStatus(int $messageId);
Unifonic::getBalance();

If you use many apps id, you can do this :

use Zizou86\Unifonic\Unifonic;

$sms = new App('second');

The key 'second' will be defined in your config/unifonic.php


'appsid' => [
    'default' => env('UNIFONIC_APPS_ID', ''),
    'second' => env('UNIFONIC_SECOND_APPS_ID', '')
],

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-17