larva / laravel-baidu-cloud
This is a Laravel expansion for the Baidu Cloud.
1.0.3
2021-03-18 08:49 UTC
Requires
- ext-dom: *
- ext-json: *
- ext-libxml: *
- ext-simplexml: *
- illuminate/bus: ^7.0 || ^8.0
- illuminate/http: ^7.0 || ^8.0
- illuminate/queue: ^7.0 || ^8.0
- illuminate/support: ^7.0 || ^8.0
- larva/support: ^1.0
This package is auto-updated.
Last update: 2024-12-18 17:02:58 UTC
README
This is a baidu cloud expansion for the laravel
接口支持
- CDN
- 自然语言处理 NLP
- SMS
环境需求
- PHP >= 7.1
Installation
composer require larva/laravel-baidu-cloud -vv
for Laravel
This service provider must be registered.
// config/app.php 'providers' => [ '...', Larva\Baidu\Cloud\BaiduCloudServiceProvider::class, ];
Use
try { $cdn = \Larva\Baidu\Cloud\BaiduCloud::get('cdn'); } catch (\Exception $e) { print_r($e->getMessage()); } try { $nlp = \Larva\Baidu\Cloud\BaiduCloud::get('nlp'); $tags = $nlp->keywords('标题','内容'); print_r($tags); } catch (\Exception $e) { print_r($e->getMessage()); }