larva/laravel-bce

This package is abandoned and no longer maintained. The author suggests using the larva/laravel-baidu-cloud package instead.

This is a Laravel expansion for the Baidu Cloud.

2.0.8 2021-01-07 03:40 UTC

README

This is a baidu cloud expansion for the laravel

License Latest Stable Version Total Downloads

接口支持

  • CDN
  • 自然语言处理 NLP
  • SMS

环境需求

  • PHP >= 7.1

Installation

composer require larva/laravel-bce

for Laravel

This service provider must be registered.

// config/app.php

'providers' => [
    '...',
    Larva\Baidu\Cloud\BceServiceProvider::class,
];

Use

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());
}