sheavescapital/laravel-ringcentral
Composer 安装命令:
composer require sheavescapital/laravel-ringcentral
包简介
A Laravel package for the RingCentral SDK for PHP
关键字:
README 文档
README
This is a simple Laravel Service Provider providing access to the RingCentral API.
Forked from https://github.com/coxlr/laravel-ringcentral, Created by Lee Cox With code from: RingCentral Connect Platform PHP SDK
Installation
This package requires PHP 8.0 and Laravel 8 or higher.
To install the PHP client library using Composer:
composer require sheavescapital/laravel-ringcentral
The package will automatically register the RingCentral provider and facade.
You can publish the config file with:
php artisan vendor:publish --provider="SheavesCapital\RingCentral\RingCentralServiceProvider" --tag="config"
Then update config/ringcentral.php with your credentials. Alternatively, you can update your .env file with the following:
RINGCENTRAL_CLIENT_ID=my_client_id RINGCENTRAL_CLIENT_SECRET=my_client_secret RINGCENTRAL_SERVER_URL=my_server_url RINGCENTRAL_JWT=my_jwt RINGCENTRAL_VERIFICATION_TOKEN=my_verification_token
This package uses the JWT autentication method. You can learn more about setting up JWT for your RingCentral account here.
Usage
To use the RingCentral Client Library you can use the facade, or request the instance from the service container.
Sending an SMS message
RingCentral::sendMessage([ 'from' => '18042221111', 'to' => '18042221111', 'text' => 'Using the facade to send a message.' ]);
Or
$ringcentral = app('ringcentral'); $ringcentral->sendMessage([ 'to' => '18042221111', 'text' => 'Using the instance to send a message.' ]);
Properties
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
| to | true | String | The number to send the message to, must include country code | |
| text | true | String | The text of the message to send |
Retrieving Extensions
RingCentral::getExtensions();
Or
$ringcentral = app('ringcentral'); $ringcentral->getExtensions();
Get messages sent and received for a given extension
RingCentral::getMessagesForExtensionId(12345678);
Or
$ringcentral = app('ringcentral'); $ringcentral->getMessagesForExtensionId(12345678);
The default from date is the previous 24 hours, to specficy the date to search from pass the require date as a parameter.
RingCentral::getMessagesForExtensionId(12345678, (new \DateTime())->modify('-1 hours'));
Parameters
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
| extensionId | true | String | The RingCentral extension Id of the extension to retrieve the messages for | |
| fromDate | false | Object | The date and time to start the search from must be a PHP date object | |
| toDate | false | Object | The date and time to end the search must be a PHP date object | |
| perPage | false | Int | 100 | The number of records to return per page |
Get a messages attachment
RingCentral::getMessageAttachmentById(12345678, 910111213, 45678910);
Or
$ringcentral = app('ringcentral'); $ringcentral->getMessageAttachmentById(12345678, 910111213, 45678910);
Parameters
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
| extensionId | true | String | The RingCentral extension Id of the extension the messages belongs to | |
| messageId | true | String | The id of the message of the the attachment belongs to | |
| attachmentId | true | String | The id of the attachment |
License
The MIT License (MIT). Please see License File for more information.
sheavescapital/laravel-ringcentral 适用场景与选型建议
sheavescapital/laravel-ringcentral 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.73k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「ringcentral」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sheavescapital/laravel-ringcentral 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sheavescapital/laravel-ringcentral 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sheavescapital/laravel-ringcentral 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
RingCentral Platform PHP SDK
RingCentral Platform PHP SDK
A Laravel package for the RingCentral SDK for PHP
Simple wrapper for https://ringcentral.com/ using webhooks
RingCentral OAuth 2.0 Client Provider for The PHP League OAuth2-Client
RingCentral Connect Platform PHP SDK
统计信息
- 总下载量: 5.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-24