| Package Data | |
|---|---|
| Maintainer Username: | zhuxiaoqiao |
| Maintainer Contact: | zhffan@163.com (Zhu Xiaoqiao) |
| Package Create Date: | 2015-05-19 |
| Package Last Update: | 2015-05-21 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-06 15:04:37 |
| Package Statistics | |
|---|---|
| Total Downloads: | 135 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 10 |
| Total Watchers: | 1 |
| Total Forks: | 2 |
| Total Open Issues: | 2 |
A Flysystem Baidu Bos Wrapper for Laravel
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',
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',
]
],
],
$exists = Storage::disk('bos')->exists('path/to/file');
$content = Storage::disk('bos')->get('path/to/file');
Documentation for laravel framework 'Filesystem/Cloud Storage' can be found on the Laravel website.