christian-giupponi/nexmo
Composer 安装命令:
composer require christian-giupponi/nexmo
包简介
This is a Laravel4 package that helps you integrate Nexmo sms services into your site.
README 文档
README
This is a Laravel4 package that helps you integrate Nexmo sms services into your site.
This is a work in progress so right now these are the function available:
- Get Account Balance
- Get Prices and Carriers
- Send SMS
Laravel 4.2 and below
You can install this package through Composer. Edit your composer.json file and add christian-giupponi/nexmo to the required:
"require" : {
"christian-giupponi/nexmo": "dev-master"
}
ext, update Composer from the Terminal:
composer update
Now you have to add the Service Provider so edit your app/config/app.php file and in the providers array add:
'ChristianGiupponi\Nexmo\NexmoServiceProvider'
Now add the Facade in aliases array:
'Nexmo' => 'ChristianGiupponi\Nexmo\Facades\Nexmo',
You also need to pusblish the config file to add your own api and secret key that you can find on your Nexmo's dashboard:
php artisan config:publish christian-giupponi/nexmo
And you're done. Now you can call nexmo package using
Nexmo::getBalance();
Nexmo::prices();
Nexmo::sendSMS($from, $to, $text, $options);
Results
All the function of this package will return a json result. It is made with 3 fiedls:
1. code
2. reason
3. body
1. Code
This fields will return an http code status that is generated by the http request and represent the result of the api call, is not the code returned from Nexmo.
It is generated by the Guzzle client and you can check if the request is correct.
2. Reason
Like the above it is generated by Gruzzle and contains the result of the api request, not the response from Nexmo.
In this fild you can check if there are any errors, like malformed request.
3. Body
This is a Json result sent by Nexmo after we call its api
Issue
If you find any issue please post it here on GitHub, fell free to fork and add any new api call that you need and then please make a pull request to keep this project updated.
christian-giupponi/nexmo 适用场景与选型建议
christian-giupponi/nexmo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.62k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2014 年 11 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 christian-giupponi/nexmo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 christian-giupponi/nexmo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-11-02