ysandreew / qcloud-cos
1.0
2017-11-21 03:31 UTC
Requires
- qcloud/cos-sdk-v4: ^4.3
Requires (Dev)
- qcloud/cos-sdk-v4: ^4.3
This package is auto-updated.
Last update: 2025-03-12 06:37:12 UTC
README
在Laravel中集成腾讯云cos储存扩展
安装
composer require ysandreew/qcloud-cos
注册服务提供者以及代理
"providers" =>[
Lee\QcloudCos\QcloudCosServiceProvider::class,
],
"aliases" =>[
'QcloudCos'=>Lee\QcloudCos\Facades\QcloudCos::class
]
发布配置文件至config/qcloud.php
php artisan vendor:publish --provider="Lee\QcloudCos\QcloudCosServiceProvider"
在配置文件添加你的腾讯云app_id以及秘钥
return[
'app_id' => '123456789',
'secret_id' => 'xxxxxxxxxxxxxxxxxx',
'secret_key' => 'xxxxxxxxxxxxxxxxxxxx',
'timeout' => 60
];
配置完成后即可在Laravel中操作Cos存储
use Lee\QcloudCos\Facades\QcloudCos;
//
· QcloudCos::createFolder('bucketName','folder')
更多方法参照腾讯云cos储存sdk文档