PHPackages                             mix5003/l5-gcs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. mix5003/l5-gcs

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

mix5003/l5-gcs
==============

Laravel 5.5+ Flysystem Google Cloud Storage Service Provider

2.0.0(8y ago)111.4k1[1 issues](https://github.com/mix5003/l5-gcs/issues)MITPHP

Since Nov 25Pushed 5y ago2 watchersCompare

[ Source](https://github.com/mix5003/l5-gcs)[ Packagist](https://packagist.org/packages/mix5003/l5-gcs)[ RSS](/packages/mix5003-l5-gcs/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Archived:
=========

[](#archived)

You can use Google CLoud Storage by standard S3 Driver (see [interoperability](https://cloud.google.com/storage/docs/interoperability)).

Sample Config in filesystems.php

```
        'gcs' => [
            'driver' => 's3',
            'key' => env('GCS_HMAC_KEY'),
            'secret' => env('GCS_HMAC_SECRET'),
            'region' => 'auto',
            'endpoint' => 'https://storage.googleapis.com/' . env('GCS_ATTACHMENT_BUCKET') . '/',
            'bucket' => env('GCS_ATTACHMENT_BUCKET'),
            'bucket_endpoint' => true,
            'options' => ['ACL' => 'project-private'], // see more https://cloud.google.com/storage/docs/access-control/lists#predefined-acl
        ],
```

---

Google Cloud Storage ServiceProvider for Laravel 5.5+
=====================================================

[](#google-cloud-storage-serviceprovider-for-laravel-55)

Just Wraps [cedricziel/flysystem-gcs](https://github.com/cedricziel/flysystem-gcs) in a Laravel 5.5+ compatible Service Provider. and add some other functionality that I need.

Addition Feature for Laravel
----------------------------

[](#addition-feature-for-laravel)

- Can use [temporaryUrl](https://laravel.com/docs/5.5/filesystem#file-urls) method.
- Can add metadata when write object.

Installation
------------

[](#installation)

`composer require mix5003/l5-gcs`

Register the service provider in `app.php`

```
'providers' => [
    // ...
    mix5003\GCSProvider\GoogleCloudStorageServiceProvider::class,
]
```

Add a new disk to your `filesystems.php` config

```
'gcs' => [
    'driver' => 'gcs',
    'projectId' => env('GCS_PROJECT_ID'),
    'bucket' => env('GCS_BUCKET'),
    'keyFilePath' => storage_path(env('GCS_KEY_FILE')),
    'url' => env('GCS_CUSTOM_URL'), // optional: for custom url only
],
```

Usage
-----

[](#usage)

Use it like any other Flysystem Adapter with the Storage-Facade.

```
$disk = Storage::disk('gcs');

// Put a private file on the 'gcs' disk which is a Google Cloud Storage bucket
$disk->put('test.png', file_get_contents(storage_path('app/test.png')));

// Put a public-accessible file on the 'gcs' disk which is a Google Cloud Storage bucket
$disk->put(
    'test-public.png',
    file_get_contents(storage_path('app/test-public.png')),
    \Illuminate\Contracts\Filesystem\Filesystem::VISIBILITY_PUBLIC
);

// Put a public-accessible file with metadata on the 'gcs' disk which is a Google Cloud Storage bucket
$disk->put(
    'test.png',
    file_get_contents(storage_path('app/test.png')),
    [
        'metadata' => [
            'contentDisposition' => 'attachment; filename=file.png',
            'contentType' => 'image/png',
        ],
        'visibility' => \Illuminate\Contracts\Filesystem\Filesystem::VISIBILITY_PUBLIC
    ]
);

// Retrieve a file
$file = $disk->get('test.png');

// Get a temporary url for 1 hour
$disk->temporaryUrl('test.png', time() + 3600);

// Get a temporary url for 1 hour with other options
// see other option: https://googlecloudplatform.github.io/google-cloud-php/#/docs/google-cloud/v0.45.1/storage/storageobject?method=signedUrl
$disk->temporaryUrl('test.pdf', time() + 3600, ['saveAsName' => 'file.png']);
```

License
=======

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~167 days

Total

2

Last Release

2920d ago

Major Versions

1.0.0 → 2.0.02018-05-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/06bc2b91ff21d7f65ed4d5e2014375ecf6636580d96dc666329c14a69ce9df08?d=identicon)[mix5003](/maintainers/mix5003)

---

Top Contributors

[![mix5003](https://avatars.githubusercontent.com/u/1129524?v=4)](https://github.com/mix5003 "mix5003 (7 commits)")

---

Tags

Flysystemlaravelgcslaravel5

### Embed Badge

![Health badge](/badges/mix5003-l5-gcs/health.svg)

```
[![Health](https://phpackages.com/badges/mix5003-l5-gcs/health.svg)](https://phpackages.com/packages/mix5003-l5-gcs)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M73](/packages/unisharp-laravel-filemanager)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)[websight/l5-google-cloud-storage

Laravel 5 Flysystem Google Cloud Storage Service Provider

3662.2k](/packages/websight-l5-google-cloud-storage)[zing/laravel-flysystem-obs

Flysystem Adapter for OBS

1211.2k](/packages/zing-laravel-flysystem-obs)[danhunsaker/laravel-flysystem-others

Automatically registers every third-party Flysystem adapter it recognizes as a Laravel Filesystem Driver.

2332.5k](/packages/danhunsaker-laravel-flysystem-others)[quix-labs/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage

169.9k](/packages/quix-labs-laravel-supabase-flysystem)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
