{"id":15188296,"url":"https://github.com/superbalist/laravel-google-cloud-storage","last_synced_at":"2025-10-02T03:30:30.975Z","repository":{"id":11334710,"uuid":"69335011","full_name":"Superbalist/laravel-google-cloud-storage","owner":"Superbalist","description":"A Google Cloud Storage filesystem for Laravel","archived":true,"fork":false,"pushed_at":"2022-07-04T13:15:42.000Z","size":35,"stargazers_count":510,"open_issues_count":37,"forks_count":145,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-08-18T15:53:11.661Z","etag":null,"topics":["flysystem","flysystem-adapter","flysystem-google-cloud-storage","google-cloud","google-cloud-platform","google-cloud-storage","google-storage","laravel","laravel-google-cloud-storage","laravel5","laravel5-package","php","superbalist"],"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/Superbalist.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2016-09-27T08:22:04.000Z","updated_at":"2025-04-16T20:53:27.000Z","dependencies_parsed_at":"2022-08-07T06:01:21.374Z","dependency_job_id":null,"html_url":"https://github.com/Superbalist/laravel-google-cloud-storage","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/Superbalist/laravel-google-cloud-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Superbalist%2Flaravel-google-cloud-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Superbalist%2Flaravel-google-cloud-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Superbalist%2Flaravel-google-cloud-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Superbalist%2Flaravel-google-cloud-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Superbalist","download_url":"https://codeload.github.com/Superbalist/laravel-google-cloud-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Superbalist%2Flaravel-google-cloud-storage/sbom","scorecard":{"id":135829,"data":{"date":"2025-08-11","repo":{"name":"github.com/Superbalist/laravel-google-cloud-storage","commit":"84a3da57e32b5a79f03b02778d2565403b17d6d9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":5,"reason":"Found 12/23 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T06:29:09.796Z","repository_id":11334710,"created_at":"2025-08-16T06:29:09.796Z","updated_at":"2025-08-16T06:29:09.796Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277950332,"owners_count":25904480,"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","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","flysystem-google-cloud-storage","google-cloud","google-cloud-platform","google-cloud-storage","google-storage","laravel","laravel-google-cloud-storage","laravel5","laravel5-package","php","superbalist"],"created_at":"2024-09-27T19:02:21.375Z","updated_at":"2025-10-02T03:30:30.707Z","avatar_url":"https://github.com/Superbalist.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-google-cloud-storage\n\nA Google Cloud Storage filesystem for Laravel.\n\n[![Author](http://img.shields.io/badge/author-@superbalist-blue.svg?style=flat-square)](https://twitter.com/superbalist)\n[![Build Status](https://img.shields.io/travis/Superbalist/laravel-google-cloud-storage/master.svg?style=flat-square)](https://travis-ci.org/Superbalist/laravel-google-cloud-storage)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![Packagist Version](https://img.shields.io/packagist/v/superbalist/laravel-google-cloud-storage.svg?style=flat-square)](https://packagist.org/packages/superbalist/laravel-google-cloud-storage)\n[![Total Downloads](https://img.shields.io/packagist/dt/superbalist/laravel-google-cloud-storage.svg?style=flat-square)](https://packagist.org/packages/superbalist/laravel-google-cloud-storage)\n\nThis package is a wrapper bridging [flysystem-google-storage](https://github.com/Superbalist/flysystem-google-storage) into Laravel as an available storage disk.\n\n## Installation\n\n```bash\ncomposer require superbalist/laravel-google-cloud-storage\n```\n\nIf you are on Laravel 5.4 or earlier, then register the service provider in app.php\n```php\n'providers' =\u003e [\n    // ...\n    Superbalist\\LaravelGoogleCloudStorage\\GoogleCloudStorageServiceProvider::class,\n]\n```\n\nIf you are on Laravel 5.5 or higher, composer will have registered the provider automatically for you.\n\nAdd a new disk to your `filesystems.php` config\n\n```php\n'gcs' =\u003e [\n    'driver' =\u003e 'gcs',\n    'project_id' =\u003e env('GOOGLE_CLOUD_PROJECT_ID', 'your-project-id'),\n    'key_file' =\u003e env('GOOGLE_CLOUD_KEY_FILE', null), // optional: /path/to/service-account.json\n    'bucket' =\u003e env('GOOGLE_CLOUD_STORAGE_BUCKET', 'your-bucket'),\n    'path_prefix' =\u003e env('GOOGLE_CLOUD_STORAGE_PATH_PREFIX', null), // optional: /default/path/to/apply/in/bucket\n    'storage_api_uri' =\u003e env('GOOGLE_CLOUD_STORAGE_API_URI', null), // see: Public URLs below\n    'visibility' =\u003e 'public', // optional: public|private\n],\n```\n\n### Authentication\n\nThe Google Client uses a few methods to determine how it should authenticate with the Google API.\n\n1. If you specify a path in the key `key_file` in  disk config, that json credentials file will be used.\n2. If the `GOOGLE_APPLICATION_CREDENTIALS` env var is set, it will use that.\n   ```php\n   putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json');\n   ```\n3. It will then try load the key file from a 'well known path':\n   * windows: %APPDATA%/gcloud/application_default_credentials.json\n   * others: $HOME/.config/gcloud/application_default_credentials.json\n\n4. If running in **Google App Engine**, the built-in service account associated with the application will be used.\n5. If running in **Google Compute Engine**, the built-in service account associated with the virtual machine instance will be used.\n6. If you want to authenticate directly without using a json file, you can specify an array for `key_file` in disk config with this data:\n    ```php\n    'key_file' =\u003e [\n        'type' =\u003e env('GOOGLE_CLOUD_ACCOUNT_TYPE'),\n        'private_key_id' =\u003e env('GOOGLE_CLOUD_PRIVATE_KEY_ID'),\n        'private_key' =\u003e env('GOOGLE_CLOUD_PRIVATE_KEY'),\n        'client_email' =\u003e env('GOOGLE_CLOUD_CLIENT_EMAIL'),\n        'client_id' =\u003e env('GOOGLE_CLOUD_CLIENT_ID'),\n        'auth_uri' =\u003e env('GOOGLE_CLOUD_AUTH_URI'),\n        'token_uri' =\u003e env('GOOGLE_CLOUD_TOKEN_URI'),\n        'auth_provider_x509_cert_url' =\u003e env('GOOGLE_CLOUD_AUTH_PROVIDER_CERT_URL'),\n        'client_x509_cert_url' =\u003e env('GOOGLE_CLOUD_CLIENT_CERT_URL'),\n    ],\n    ```\n\n### Public URLs\n\nThe adapter implements a `getUrl($path)` method which returns a public url to a file.\n\u003e**Note:** Method available for Laravel 5.2 and higher. If used on 5.1, it will throw an exception.\n\n```php\n$disk = Storage::disk('gcs');\n$url = $disk-\u003eurl('folder/my_file.txt');\n\u003e\u003e\u003e http://storage.googleapis.com/bucket-name/folder/my_file.txt\n```\n\nIf you configure a `path_prefix` in your config:\n```php\n$disk = Storage::disk('gcs');\n$url = $disk-\u003eurl('folder/my_file.txt');\n\u003e\u003e\u003e http://storage.googleapis.com/bucket-name/path-prefix/folder/my_file.txt\n```\n\nIf you configure a custom `storage_api_uri` in your config:\n```php\n$disk = Storage::disk('gcs');\n$url = $disk-\u003eurl('folder/my_file.txt');\n\u003e\u003e\u003e http://your-custom-domain.com/bucket-name/path-prefix/folder/my_file.txt\n```\n\nFor a custom domain (storage api uri), you will need to configure a CNAME DNS entry pointing to `storage.googleapis.com`.\n\nPlease see https://cloud.google.com/storage/docs/xml-api/reference-uris#cname for further instructions.\n\n## Usage\n\n```php\n$disk = Storage::disk('gcs');\n\n// create a file\n$disk-\u003eput('avatars/1', $fileContents);\n\n// check if a file exists\n$exists = $disk-\u003eexists('file.jpg');\n\n// get file modification date\n$time = $disk-\u003elastModified('file1.jpg');\n\n// copy a file\n$disk-\u003ecopy('old/file1.jpg', 'new/file1.jpg');\n\n// move a file\n$disk-\u003emove('old/file1.jpg', 'new/file1.jpg');\n\n// get url to file\n$url = $disk-\u003eurl('folder/my_file.txt');\n\n// Set the visibility of file to public\n$disk-\u003esetVisibility('folder/my_file.txt', 'public');\n\n\n// See https://laravel.com/docs/5.3/filesystem for full list of available functionality\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperbalist%2Flaravel-google-cloud-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperbalist%2Flaravel-google-cloud-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperbalist%2Flaravel-google-cloud-storage/lists"}