Download the PHP package websight/l5-google-cloud-storage without Composer
On this page you can find all versions of the php package websight/l5-google-cloud-storage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package l5-google-cloud-storage
Google Cloud Storage ServiceProvider for Laravel 5 Apps
Wraps cedricziel/flysystem-gcs in a Laravel 5.x compatible Service Provider.
Note:
This project doesn't support the deprecated p12 credentials format anymore.
If you rely on it, please use the 1.x versions.
Configuration
Dedicated credentials: Obtain json service account credentials of a dedicated CloudPlatform Service Account
or
Local authentication through gcloud: Log in locally on your machine through the gcloud command-line
utility.
-
Add the service provider to your application in
config/app.php -
Add a disk to the
disksarray in config/filesystems.php - If Google Cloud Storage is the only
clouddisk, you may consider setting it as theclouddisk, so that you can access it likeStorage::cloud()->$operation()via'cloud' => 'gcs',in thefilesystems.phpconfig file.
Authentication and the different configuration options
Google Cloud Platform uses json credential files. For the use-case of this library, there are two different types that can easily confuse you.
- credentials type
userThis is the type of credentials that identifies you as a user entity, most likely when authenticated through thegcloudutility. Since this type of credentials identifies users and users can belong to more than one project, you need to specify theproject_idconfig option. The keys should automatically be detected through their well-known location. - credentials type
service_accountService Account credentials are for authorizing machines and / or individual services to Google Cloud Platform. AppEngine instances and GCE machines already have a service account pre-installed so you don't need to configure neitherproject_idnotcredentials, since service accounts carry the information to which project they belong.
When do I need to configure which option?
| Location | project_id |
credentials |
bucket |
|---|---|---|---|
| AppEngine (Standard & Flex) | detected automatically | detected automatically | needs to be set |
| Deployment to non-GCP machine | needs to be set | needs to be set | needs to be set |
| Local development with user credentials | needs to be set | detected automatically | needs to be set |
| Local development with service account | detected automatically | needs to be set | needs to be set |
Usage
Use it like any other Flysystem Adapter with the Storage-Facade.
License
MIT
All versions of l5-google-cloud-storage with dependencies
illuminate/support Version ~5.0.17|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*
cedricziel/flysystem-gcs Version ^1.0