larva / laravel-bce
2.0.8
2021-01-07 03:40 UTC
Requires
- ext-dom: *
- ext-json: *
- ext-libxml: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^6.5 || ^7.2
- illuminate/bus: ^5.0 || ^6.0 || ^7.0 || ^8.0
- illuminate/queue: ^5.0 || ^6.0 || ^7.0 || ^8.0
- illuminate/support: ^5.0 || ^6.0 || ^7.0 || ^8.0
- larva/supports: ^2.0
README
这是Laravel的百度云扩展。
接口支持
- CDN
- 自然语言处理 NLP
- 短信 SMS
环境需求
- PHP >= 7.1
安装
composer require larva/laravel-bce
针对Laravel
必须注册此服务提供者。
// config/app.php 'providers' => [ '...', Larva\Baidu\Cloud\BceServiceProvider::class, ];
使用
try { $cdn = \Larva\Baidu\Cloud\Bce::get('cdn'); } catch (\Exception $e) { print_r($e->getMessage()); } try { $nlp = \Larva\Baidu\Cloud\Bce::get('nlp'); $tags = $nlp->keywords('标题','内容'); print_r($tags); } catch (\Exception $e) { print_r($e->getMessage()); }