{"id":20458050,"url":"https://github.com/halalsoft/laravel-google-cloud-storage","last_synced_at":"2025-03-05T10:46:12.421Z","repository":{"id":62514129,"uuid":"277488235","full_name":"HalalSoft/laravel-google-cloud-storage","owner":"HalalSoft","description":"A Google Cloud Storage flysystem for Laravel","archived":false,"fork":false,"pushed_at":"2021-10-14T19:47:41.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T00:14:47.789Z","etag":null,"topics":[],"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/HalalSoft.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":null,"security":null,"support":null}},"created_at":"2020-07-06T08:40:29.000Z","updated_at":"2021-11-08T12:04:41.000Z","dependencies_parsed_at":"2022-11-02T13:30:26.995Z","dependency_job_id":null,"html_url":"https://github.com/HalalSoft/laravel-google-cloud-storage","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalalSoft%2Flaravel-google-cloud-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalalSoft%2Flaravel-google-cloud-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalalSoft%2Flaravel-google-cloud-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HalalSoft%2Flaravel-google-cloud-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HalalSoft","download_url":"https://codeload.github.com/HalalSoft/laravel-google-cloud-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242014250,"owners_count":20057871,"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":[],"created_at":"2024-11-15T12:10:26.888Z","updated_at":"2025-03-05T10:46:12.399Z","avatar_url":"https://github.com/HalalSoft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Google Cloud Storage\n\nA Google Cloud Storage filesystem for Laravel.\n\n[![StyleCI](https://github.styleci.io/repos/277488235/shield?branch=master)](https://github.styleci.io/repos/277488235?branch=master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HalalSoft/laravel-google-cloud-storage/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/HalalSoft/laravel-google-cloud-storage/?branch=master)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/810881222d7f41e7ba0f14998418dc00)](https://www.codacy.com/gh/HalalSoft/laravel-google-cloud-storage?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=HalalSoft/laravel-google-cloud-storage\u0026amp;utm_campaign=Badge_Grade)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/HalalSoft/laravel-google-cloud-storage/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)\n[![Build Status](https://scrutinizer-ci.com/g/HalalSoft/laravel-google-cloud-storage/badges/build.png?b=master)](https://scrutinizer-ci.com/g/HalalSoft/laravel-google-cloud-storage/build-status/master)\n[![GitHub repo size](https://img.shields.io/github/repo-size/halalsoft/laravel-google-cloud-storage?label=Repository%20size)](https://github.com/neneone/SnapeBot)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![GitHub top language](https://img.shields.io/github/languages/top/neneone/SnapeBot?label=PHP)](https://github.com/neneone/SnapeBot)\n[![Packagist Version](https://img.shields.io/packagist/v/halalsoft/laravel-google-cloud-storage.svg?style=flat-square)](https://packagist.org/packages/halalsoft/laravel-google-cloud-storage)\n[![Total Downloads](https://img.shields.io/packagist/dt/halalsoft/laravel-google-cloud-storage.svg?style=flat-square)](https://packagist.org/packages/halalsoft/laravel-google-cloud-storage)\n\nThis is using [flysystem-aws-s3-v3](https://packagist.org/packages/league/flysystem-aws-s3-v3). Because  Google Cloud Storage uses the same api as Amazon S3, so actually I just use the same driver but I renamed to gcs.\n## Installation\n```\ncomposer require halalsoft/laravel-google-cloud-storage\n```\n\nAdd a new disk to your `filesystems.php` config\n\n```php\n'gcs' =\u003e [\n        'driver'   =\u003e 'gcs',\n        'key'      =\u003e env('GCP_ACCESS_KEY_ID'),\n        'secret'   =\u003e env('GCP_SECRET_ACCESS_KEY'),\n        'bucket'   =\u003e env('GCP_BUCKET'),\n],\n```\n\nAbove is the config that required, here is other possible configs:\n```php\n'gcs' =\u003e [\n        'driver'   =\u003e 'gcs',\n        'key'      =\u003e env('GCP_ACCESS_KEY_ID'),\n        'secret'   =\u003e env('GCP_SECRET_ACCESS_KEY'),\n        'bucket'   =\u003e env('GCP_BUCKET'),\n        'visibility' =\u003e 'public', //Default visibility, you can set public or private\n        'url'    =\u003e \"https://custom.domain.com\", //Your public URL (if you use custom domain or CDN)\n        'endpoint' =\u003e \"https://storage.googleapis.com\", //Your endpoint URL (if you use custom driver)\n        'cache' =\u003e [\n            'store' =\u003e 'memcached',\n            'expire' =\u003e 600,\n            'prefix' =\u003e 'cache-prefix',\n          ],\n],\n```\n## Usage\nYou can use most of [Laravel Filesystem API](https://laravel.com/docs/7.x/filesystem)\n\nExamples:\n```php\n$disk = Storage::disk('gcs');\n\n// create a file\n$disk-\u003eput('avatars/1', $request-\u003efile(\"image\"));\n\n// check if a file exists\n$exists = $disk-\u003eexists('image.jpg');\n\n// get file last modification date\n$time = $disk-\u003elastModified('image1.jpg');\n\n// copy a file\n$disk-\u003ecopy('old/image1.jpg', 'new/image1.jpg');\n\n// move a file\n$disk-\u003emove('old/image1.jpg', 'new/image1.jpg');\n\n// get url to file\n$url = $disk-\u003eurl('avatar/yaskur.jpg');\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalalsoft%2Flaravel-google-cloud-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalalsoft%2Flaravel-google-cloud-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalalsoft%2Flaravel-google-cloud-storage/lists"}