patricpoba/arkesel-php
Composer 安装命令:
composer require patricpoba/arkesel-php
包简介
This package enables sending of sms from your laravel application using https://sms.arkesel.com as a service provider.
关键字:
README 文档
README
This package enables sending of sms from your laravel application using https://sms.arkesel.com as a service provider.
Requirements & Installation
This package requires at least php 7.0 or laravel 5.5. You can install the package via composer:
composer require patricpoba/arkesel-php
PHP Usage
// PHP Examples use PatricPoba\Arkesel\Sms; $sms = new Sms('SenderId', 'smsApiKey'); ## Basic sending(uses api_key set in .env file) // successful response: {"code":"ok","message":"Successfully Send","balance":17706,"user":"Yaw Berko"} // error response: {"code":"102","message":"Authentication Failed"} $sms->send('02XXXXXXXXX', 'Testing sms messaging'); ## To use a different api key at runtime, $sms->setApiKey('API_KEY_GOES_HERE')->send('02XXXXXXXX', 'Testing App'); ## To customise sender Id (must not be more than 11 characters) $sms->from('CompanyName')->send('02XXXXXXXX', 'Testing App'); ## Sceduling (sending message at a later time) // successful response: {"code":"109","message":"Invalid Schedule Time"} // successful response: {"code":"ok","message":"SMS Scheduled successfully.","balance":17705,"user":"Yaw Berko"} $dateTime ='04-05-2020 06:19 PM'; // Must be this format - "d-m-Y h:i A" $sms->schedule($dateTime, '02XXXXXXXX', 'This message will be sent later') ## Checking Sms balance // successful response: {"balance":17707,"user":"Yaw Berko","country":"Ghana"} $sms->balance(); ## Check balance of a different a arkesel account account, $sms->setApiKey('API_KEY_GOES_HERE')->balance();
Laravel
If you're using laravel 5.5 and above, you can skip this step and continue at the examples. Add the following line of code to the providers' array in config/app.php file.
PatricPoba\Arkesel\ArkeselServiceProvider::class
Add the facade of this package to the aliases array in the config/app.php file.
'ArkeselSms' => PatricPoba\Arkesel\ArkeselSmsFacade::class
Usage Examples
# Setting API key in .env file Before you can start sending sms you will need to set your api key and default sender ID in your /.env file You can find your api key here `https://sms.arkesel.com/user/sms-api/info` These config files can be changed from the laravel application. <!-- /.env file --> ARKESEL_SMS_SENDER_ID=MyApp ARKESEL_SMS_API_KEY=YourKeyGoesHere ## Sending Sms ## Basic sending(uses api_key set in .env file) * successful response: {"code":"ok","message":"Successfully Send","balance":17706,"user":"Yaw Berko"} * error response: {"code":"102","message":"Authentication Failed"} * */ ArkeselSms::send('02XXXXXXXXX', 'Testing sms messaging'); ## To use a different api key at runtime, ArkeselSms::setApiKey('API_KEY_GOES_HERE')->send('02XXXXXXXX', 'Testing App'); ## To customise sender Id (must not be more than 11 characters) ArkeselSms::from('CompanyName')->send('02XXXXXXXX', 'Testing App'); ## Sceduling (sending message at a later time) // successful response: {"code":"109","message":"Invalid Schedule Time"} // successful response: {"code":"ok","message":"SMS Scheduled successfully.","balance":17705,"user":"Yaw Berko"} $dateTime ='04-05-2020 06:19 PM'; // Must be this format - "d-m-Y h:i A" ArkeselSms::schedule($dateTime, '02XXXXXXXX', 'This message will be sent later') ## Checking Sms balance // successful response: {"balance":17707,"user":"Yaw Berko","country":"Ghana"} ArkeselSms::balance(); ## Check balance of a different a arkesel account account, ArkeselSms::setApiKey('API_KEY_GOES_HERE')->balance();
Security
If you discover any security related issues, please me a message on twitter instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
patricpoba/arkesel-php 适用场景与选型建议
patricpoba/arkesel-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 516 次下载、GitHub Stars 达 7, 最近一次更新时间为 2020 年 05 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「patricpoba」 「arkesel-sms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 patricpoba/arkesel-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 patricpoba/arkesel-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 patricpoba/arkesel-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 516
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-04