kubacode/telstrasms 问题修复 & 功能扩展

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

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

kubacode/telstrasms

最新稳定版本:0.0.1

Composer 安装命令:

composer require kubacode/telstrasms

包简介

telstraSMS is a PHP Implementation of the Telstra SMS API

README 文档

README

Build Status

telstraSMS is a PHP package for the Telstra SMS API.

The author is not affiliated with Telstra and Telstra is not involved in the development of this package in any way.

Install

Via Composer

$ composer require kubacode/telstrasms

Laravel Configuration

telstraSMS has optional support for Laravel and comes with a Service Provider and Facades for easy integration. The vendor/autoload.php is included by Laravel, so you don't have to require or autoload manually. Just see the instructions below.

After you have installed telstraSMS, open your Laravel config file config/app.php and add the following lines.

In the $providers array add the service providers for this package.

kubacode\telstraSMS\SMSServiceProvider::class,

Add the facade of this package to the $aliases array.

'SMS' => kubacode\telstraSMS\SMSFacade::class,

Now the SMS Class will be auto-loaded by Laravel.

You also need to supply your API Key & API Secret in your .env environment file.

SMS_API_KEY=clientKey
SMS_API_SECRET=clientSecret

Usage

$clientKey = 'clientKey';
$clientSecret = 'clientSecret';
$to = '0400000000';
$body = 'SMS Message'
$message = new kubacode\telstraSMS\telstraSMS($clientKey, $clientSecret);
$message->send($to, $body);

Laravel Usage

// usage inside a laravel route
Route::get('/', function()
{
    $message = SMS::send('0400000000', 'Test SMS');

    return $message->messageId;
});

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-01