junegunn / laravel-filesystem-google-cloud-storage
基于 Google Cloud Storage 的 Laravel Flysystem 实现,通过 S3Client。
1.0.0
2016-10-26 09:02 UTC
Requires
- php: >=7.0.0
- illuminate/filesystem: ~5.2
- illuminate/support: ~5.2
- league/flysystem-aws-s3-v3: ^1.0
Requires (Dev)
- mockery/mockery: ^0.9
- phpunit/phpunit: ~5.0
This package is not auto-updated.
Last update: 2024-09-28 19:31:17 UTC
README
基于 Google Cloud Storage 的 Laravel Flysystem 实现,通过 S3Client。
入门
安装
您可以通过 composer 使用以下命令安装此包
composer require jungehaie/filesystem-google-cloud-storage
Laravel 5.3+
- 注册服务提供者
// config/app.php 'providers' => [ ... JungeHaie\GoogleCloudStorage\GoogleCloudStorageServiceProvider::class, ]
Lumen 5.3+
- 注册服务提供者
// bootstrap/app.php $app->register(JungeHaie\GoogleCloudStorage\GoogleCloudStorageServiceProvider::class);
- 在
config/filesystems.php
中添加配置文件
您可以复制 Laravel 的 filesystems.php 中的内容
- 注册要加载的配置
// bootstrap/app.php $app->configure('filesystems');
现在您已经设置好了!
配置
您的基本的 config/filesystems.php
磁盘条目可能如下所示
'google' => [ 'driver' => 'gcs', 'key' => env('GCS_KEY'), 'secret' => env('GCS_SECRET'), 'region' => env('GCS_REGION'), 'bucket' => env('GCS_BUCKET'),
这通常足以让您开始。
但是,您也可以设置以下选项
- base_url
- version
贡献
拉取请求
-
添加测试 - 如果您的补丁没有测试,则不会接受。
-
记录任何更改 - 确保将
README.md
和任何其他相关文档保持最新。 -
创建功能分支 - 使用
git checkout -b my-new-feature
-
每个功能一个拉取请求 - 如果您想做更多的事情,请发送多个拉取请求。
-
发送连贯的历史记录 - 确保您的拉取请求中的每个单独提交都是有意义的。如果您在开发过程中必须做出多个中间提交,请在提交之前请压缩它们。
许可证
此库根据 MIT 许可证 条款分发。