{"id":20531992,"url":"https://github.com/websightgmbh/l5-google-cloud-storage","last_synced_at":"2025-06-16T22:07:27.463Z","repository":{"id":57079154,"uuid":"46980166","full_name":"websightgmbh/l5-google-cloud-storage","owner":"websightgmbh","description":"Laravel 5 Flysystem Adapter for Google Cloud Storage","archived":false,"fork":false,"pushed_at":"2018-03-23T08:15:01.000Z","size":26,"stargazers_count":36,"open_issues_count":7,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-27T15:15:47.269Z","etag":null,"topics":["flysystem","flysystem-adapter","google-cloud-storage"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/websightgmbh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-27T12:53:51.000Z","updated_at":"2023-08-15T16:39:19.000Z","dependencies_parsed_at":"2022-08-24T14:56:23.919Z","dependency_job_id":null,"html_url":"https://github.com/websightgmbh/l5-google-cloud-storage","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/websightgmbh/l5-google-cloud-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websightgmbh%2Fl5-google-cloud-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websightgmbh%2Fl5-google-cloud-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websightgmbh%2Fl5-google-cloud-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websightgmbh%2Fl5-google-cloud-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/websightgmbh","download_url":"https://codeload.github.com/websightgmbh/l5-google-cloud-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websightgmbh%2Fl5-google-cloud-storage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260249966,"owners_count":22980765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flysystem","flysystem-adapter","google-cloud-storage"],"created_at":"2024-11-16T00:11:45.331Z","updated_at":"2025-06-16T22:07:27.443Z","avatar_url":"https://github.com/websightgmbh.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Cloud Storage ServiceProvider for Laravel 5 Apps\n\n[![Latest Stable Version](https://poser.pugx.org/websight/l5-google-cloud-storage/v/stable)](https://packagist.org/packages/websight/l5-google-cloud-storage) [![Total Downloads](https://poser.pugx.org/websight/l5-google-cloud-storage/downloads)](https://packagist.org/packages/websight/l5-google-cloud-storage) [![Latest Unstable Version](https://poser.pugx.org/websight/l5-google-cloud-storage/v/unstable)](https://packagist.org/packages/websight/l5-google-cloud-storage) [![License](https://poser.pugx.org/websight/l5-google-cloud-storage/license)](https://packagist.org/packages/websight/l5-google-cloud-storage)\n\nWraps [cedricziel/flysystem-gcs](https://github.com/cedricziel/flysystem-gcs) in a Laravel 5.x\ncompatible Service Provider.\n\n**Note:**\nThis project doesn't support the deprecated `p12` credentials format anymore.\nIf you rely on it, please use the `1.x` versions.\n\n## Configuration\n\n*Dedicated credentials:* Obtain json service account credentials of a dedicated CloudPlatform Service Account\n\n**or**\n\n*Local authentication through gcloud:* Log in locally on your machine through the `gcloud` command-line\nutility.\n\n* Add the service provider to your application in ``config/app.php``\n   ```php\n   Websight\\GcsProvider\\CloudStorageServiceProvider::class,\n   ```\n   \n* Add a disk to the `disks` array in config/filesystems.php\n  ```php\n  'gcs' =\u003e [\n      // Select the Google Cloud Storage Disk\n      'driver'         =\u003e 'gcs',\n      // OPTIONAL: The location of the json service account certificate, see below\n      // 'credentials' =\u003e storage_path('my-service-account-credentials.json'),\n      // OPTIONAL: The GCP project id, see below\n      // 'project_id'  =\u003e 'my-project-id-4711',\n      // The bucket you want this disk to point at\n      'bucket'         =\u003e 'my-project-id-4711.appspot.com',\n  ],\n  ```\n   \n* If Google Cloud Storage is the only `cloud` disk, you may consider\n  setting it as the `cloud` disk, so that you can access it like\n  `Storage::cloud()-\u003e$operation()` via `'cloud' =\u003e 'gcs',` in the `filesystems.php`\n  config file.\n   \n## Authentication and the different configuration options\n\nGoogle Cloud Platform uses json credential files. For the use-case of this library,\nthere are two different types that can easily confuse you.\n\n1. credentials type `user`\n   This is the type of credentials that identifies you as a user entity,\n   most likely when authenticated through the `gcloud` utility.\n   Since this type of credentials identifies users and users can belong\n   to more than one project, you need to specify the `project_id` config option.\n   The keys should automatically be detected through their well-known location.\n2. credentials type `service_account`\n   Service Account credentials are for authorizing machines and / or individual\n   services to Google Cloud Platform. AppEngine instances and GCE machines\n   already have a service account pre-installed so you don't need to configure\n   neither `project_id` not `credentials`, since service accounts carry the information\n   to which project they belong.\n\n### When do I need to configure which option?\n\n| Location                                | `project_id`             | `credentials`            | `bucket`        |\n|-----------------------------------------|--------------------------|--------------------------|-----------------|\n| AppEngine (Standard \u0026 Flex)             | *detected automatically* | *detected automatically* | needs to be set |\n| Deployment to non-GCP machine           | needs to be set          | needs to be set          | needs to be set |\n| Local development with user credentials | needs to be set          | *detected automatically* | needs to be set |\n| Local development with service account  | *detected automatically* | needs to be set          | needs to be set |\n\n## Usage\n\nUse it like any other Flysystem Adapter with the ``Storage``-Facade.\n\n```php\n$disk = Storage::disk('gcs');\n\n// Put a private file on the 'gcs' disk which is a Google Cloud Storage bucket\n$disk-\u003eput('test.png', file_get_contents(storage_path('app/test.png')));\n\n// Put a public-accessible file on the 'gcs' disk which is a Google Cloud Storage bucket\n$disk-\u003eput(\n    'test-public.png',\n    file_get_contents(storage_path('app/test-public.png')),\n    \\Illuminate\\Contracts\\Filesystem\\Filesystem::VISIBILITY_PUBLIC\n);\n\n// Retrieve a file\n$file = $disk-\u003eget('test.png');\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsightgmbh%2Fl5-google-cloud-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsightgmbh%2Fl5-google-cloud-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsightgmbh%2Fl5-google-cloud-storage/lists"}