aoBoZhang / aliyun-oss-adapter
使用阿里云OSS作为Laravel 5.0+的存储
1.0.2
2015-12-28 09:09 UTC
Requires
- php: >=5.4.0
- aliyuncs/oss-sdk-php: ~2.0.4
- league/flysystem: ~1.0
Suggests
- laravel/framework: 5.2.*
This package is not auto-updated.
Last update: 2024-09-14 08:38:04 UTC
README
阿里云OSS驱动程序,适用于Laravel5.0+,也支持flysystem适配器。
灵感来源于orzcc/aliyun-oss
使用方法
use Storage; //... Strorage::[everything in doc]
更多信息
安装
此包可以通过Composer安装。
composer require aobozhang/aliyun-oss-adapter
配置
必须注册此服务提供者。
// config/app.php 'providers' => [ ..., Aobo\OSS\AliyunOssFilesystemServiceProvider::class, ];
添加配置
// config/filesystem.php. 'oss' => [ 'driver' => 'oss', 'access_id' => env('OSS_ACCESS_ID','your id'), 'access_key' => env('OSS_ACCESS_KEY','your key'), 'bucket' => env('OSS_BUCKET','your bucket'), 'endpoint' => env('OSS_ENDPOINT','your endpoint'), // eg. oss-cn-beijing.aliyuncs.com !!without 'http://' in OSS SDK 2.0+ ],
将默认值更改为oss
'default' => 'oss';