epmnzava / telerivet
Telerivet https://telerivet.com 对 laravel 的包装器
1.0.4
2022-02-16 14:43 UTC
Requires
- php: ^7.1|^7.2|^7.3|^7.4|^8.0
- illuminate/support: ^5.5.44|^6.0|^7.0|^8.0|^9.0
- nesbot/carbon: ^2.44
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
README
此包帮助您通过为 Laravel 开发者制作的 API 简单地开始与 Telerivet 服务集成
安装
您可以通过 composer 安装此包
composer require epmnzava/telerivet
更新您的配置(适用于 Laravel 5.4 及以下版本)
将服务提供者添加到 config/app.php 中的 providers 数组
Epmnzava\Telerivet\TelerivetServiceProvider::class,
将外观添加到 config/app.php 中的 aliases 数组
'Sms' =>Epmnzava\Telerivet\TelerivetFacade,
发布包配置(适用于 Laravel 5.4 及以下版本)
通过运行提供的控制台命令发布配置文件和迁移
php artisan vendor:publish --provider="Epmnzava\Telerivet\TelerivetServiceProvider" --tag="config"
环境变量
-
TELERIVET_API_ID
您提供的 telerivet 项目 ID
-
TELERIVET_API_KEY
您提供的 telerivet 应用程序密钥
-
TELERIVET_WEB_HOOK
即将推出
用法
发送短信
// coming soon ... <?php use Epmnzava\Telerivet\Telerivet; class SendNotification extends Controller { public function send_sms(){ $sms=new Telerivet; $result=$sms->send_sms("+255679079774","This is a hellow world text"); echo json_encode($result); }
测试
composer test
变更日志
请参阅 变更日志 了解最近更改的更多信息。
贡献
请参阅 贡献指南 了解详细信息。
安全
如果您发现任何安全相关的问题,请通过电子邮件 epmnzava@gmail.com 而不是使用问题跟踪器。
致谢
许可证
MIT 许可证(MIT)。请参阅 许可证文件 了解更多信息。