PHP code example of buxuhunao / laravel-baidu-aip
1. Go to this page and download the library: Download buxuhunao/laravel-baidu-aip library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
buxuhunao / laravel-baidu-aip example snippets
return [
// ...
'baidu-aip' => [
'client_id' => env('BAIDU_AIP_CLIENT_ID'),
'client_secret' => env('BAIDU_AIP_CLIENT_SECRET'),
]
];
使用Facade门面
\Buxuhunao\LaravelBaiduAip\Support\Aip::add($options)
或
/**
* @var BaiduAip $app
*/
$app = app(\Buxuhunao\LaravelBaiduAip\BaiduAip::class);
$app->add($options)
可用方法:
// 入库
$app->add($options);
// 检索
$app->search($options);
// 更新
$app->update($options);
// 删除
$app->remove($options);