jlorente / laravel-stethome
Laravel ^5.6 集成 Jlorente StethoMe 包。
2.0.3
2021-06-25 10:23 UTC
Requires
- php: >=7.0
- illuminate/support: >=5.5
- jlorente/stethome-php-sdk: ^2.0.2
README
Laravel 对 StethoMe SDK 的集成。
安装
安装此扩展的首选方式是通过 Composer。
安装 Composer 后,可以使用以下命令安装扩展
$ php composer.phar require jlorente/laravel-stethome
或添加
... "require": { "jlorente/laravel-stethome": "*" }
到您的 composer.json
文件的 require
部分。
配置
- 在您的
config/app.php
服务提供者列表中注册 ServiceProvider。
config/app.php
return [ //other stuff 'providers' => [ //other stuff \Jlorente\Laravel\StethoMe\StethoMeServiceProvider::class, ]; ];
- 将以下外观添加到 $aliases 部分。
config/app.php
return [ //other stuff 'aliases' => [ //other stuff 'StethoMe' => \Jlorente\Laravel\StethoMe\Facades\StethoMe::class, ]; ];
- 在 config/stethome.php 文件中设置 vendor_token 或使用预定义的 env 变量。
config/stethome.php
return [ 'vendor_token' => 'YOUR_VENDOR_TOKEN', //other configuration ];
或 .env
//other configurations
STETHOME_VENDOR_TOKEN=<YOUR_VENDOR_TOKEN>
使用
您可以使用外观别名 StethoMe 来执行 API 调用。认证参数将被自动注入。
StethoMe::pulmonary()->getVisitId();
有关方法和 API 端点参数以及响应的更多信息,请参阅 StethoMe PHP SDK 或 StethoMe API。
许可证
版权 © 2020 José Lorente Martín jose.lorente.martin@gmail.com.
根据 BSD 3-Clause 许可证授权。有关详细信息,请参阅 LICENSE.txt。