$ composer require gming/qiniu-oss-for-laravel --prefer-source
Then add the service provider to config/app.php
Gming\QiniuOss\QiniuOssServiceProvider::class
Publish the config file:
$ php artisan vendor:publish --provider='Gming\QiniuOss\QiniuOssServiceProvider'
Finally, add feature trait into class:
use Gming\QiniuOss\Traits\QiniuOss;
class Example extends ExampleParent
{
use QiniuOss;
}
All available APIs are listed below.
$this->uploadCertificate($fileUrl, $maxFileSize, $ttl = 3600, $customParam = '')
$this->fileInfo($fileUri, $fileName = '')
$this->fileBaseUrl()