laravel-filesystem-google-cloud-storage
A Laravel Flysystem implementation for the Google Cloud Storage via a S3Client., (*1)
Getting started
Installation
You can install this package via composer using this command:, (*2)
composer require jungehaie/filesystem-google-cloud-storage
, (*3)
Laravel 5.3+
- Register the Service Provider
// config/app.php
'providers' => [
...
JungeHaie\GoogleCloudStorage\GoogleCloudStorageServiceProvider::class,
]
Lumen 5.3+
- Register the Service Provider
// bootstrap/app.php
$app->register(JungeHaie\GoogleCloudStorage\GoogleCloudStorageServiceProvider::class);
- Add a configuration file at
config/filesystems.php
You can copy the content of Laravels filesystems.php, (*4)
- Register the configuration to be loaded
// bootstrap/app.php
$app->configure('filesystems');
Now you're all set!, (*5)
Configuration
Your basic config/filesystems.php
disk entry could look like this:, (*6)
'google' => [
'driver' => 'gcs',
'key' => env('GCS_KEY'),
'secret' => env('GCS_SECRET'),
'region' => env('GCS_REGION'),
'bucket' => env('GCS_BUCKET'),
This will often be enough to get you started.
However you can also set following options:
* base_url
* version, (*7)
-
Where do I get a GCS key and secret?
Look no furhter!, (*8)
-
How do I set a GCS region?
I got you covered., (*9)
Contributing
Pull Requests
-
PSR-2 Coding Standard, (*10)
-
Add tests - Your patch won't be accepted if it doesn't have tests., (*11)
-
Document any changes - Make sure the README.md
and any other relevant documentation are kept up-to-date., (*12)
-
Create feature branches - Use git checkout -b my-new-feature
, (*13)
-
One pull request per feature - If you want to do more than one thing, send multiple pull requests., (*14)
-
Send coherent history - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting., (*15)
Licence
This library is distributed under the terms of the MIT license, (*16)