zhuxiaoqiao/laravel-baidu-bos
最新稳定版本:v1.0.3
Composer 安装命令:
composer require zhuxiaoqiao/laravel-baidu-bos
包简介
A Flysystem Baidu Bos Wrapper for Laravel
README 文档
README
A Flysystem Baidu Bos Wrapper for Laravel
Installation
composer require "zhuxiaoqiao/laravel-baidu-bos": "~1.0"
or add the following line to your project's composer.json:
"require": { "zhuxiaoqiao/laravel-baidu-bos": "~1.0" }
then
composer update
After completion of the above, add the following line to the section providers of config/app.php:
'Zhuxiaoqiao\LaravelBaiduBos\BaiduBosFilesystemServiceProvider',
Configuration
Edit config\filesystems.php:
Add bos disk
'disks' => [ 'local' => [ 'driver' => 'local', 'root' => storage_path().'/app', ], 's3' => [ 'driver' => 's3', 'key' => 'your-key', 'secret' => 'your-secret', 'region' => 'your-region', 'bucket' => 'your-bucket', ], 'rackspace' => [ 'driver' => 'rackspace', 'username' => 'your-username', 'key' => 'your-key', 'container' => 'your-container', 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', 'region' => 'IAD', 'url_type' => 'publicURL' ], 'bos' => [ 'driver' => 'bos', 'bucket' => 'your-bucket-name', 'options' => [ 'credentials' => [ 'ak' => 'your-ak', 'sk' => 'your-sk', ], 'endpoint' => 'http://bj.bcebos.com', ] ], ],
Usage
$exists = Storage::disk('bos')->exists('path/to/file'); $content = Storage::disk('bos')->get('path/to/file');
Official Documentation
Documentation for laravel framework 'Filesystem/Cloud Storage' can be found on the Laravel website.
统计信息
- 总下载量: 135
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-19