liou2021 / gcs
为 Laravel 9 的 GCP 存储
v1.2.2
2022-08-24 13:24 UTC
Requires
- php: ^8.1
- google/cloud: ^0.188.0
- guzzlehttp/guzzle: ^7.2
- laravel/framework: ^9.19
README
- 此包有助于 Laravel 9 使用 GCP 存储
编辑你的 composer.json
"repositories": { "liou2021": { "type": "vcs", "url": "https://github.com/LIOU2021/gcs" } }
在你的 Laravel 项目中运行此命令
composer require liou2021/gcs
发布配置
php artisan vendor:publish --provider="Liou2021\Gcs\GCSServiceProvider"
编辑你的配置(config/gcs.php)
return[ 'bucket'=>'your bucket name', 'key'=>'your gcp key' ];
常规
return \GCS::allFiles(); return \GCS::Files('test/'); return \GCS::put($request->file, $path);