PHPackages                             fypyuhu/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. fypyuhu/l5-gcs

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

fypyuhu/l5-gcs
==============

Laravel 7.0+ Flysystem Google Cloud Storage Service Provider

4.0(5y ago)0123MITPHP

Since Nov 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fypyuhu/l5-gcs)[ Packagist](https://packagist.org/packages/fypyuhu/l5-gcs)[ RSS](/packages/fypyuhu-l5-gcs/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

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

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

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 fypyuhu/l5-gcs`

Register the service provider in `app.php`

```
'providers' => [
    // ...
    fypyuhu\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

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~312 days

Total

4

Last Release

2153d ago

Major Versions

1.0.0 → 2.0.02018-05-12

2.0.0 → 3.02020-06-19

3.0 → 4.02020-06-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebd7e5e9bfb615fbb5d0c520ebffa89016239baa05b38acccc69eb5565d42de0?d=identicon)[fypyuhu](/maintainers/fypyuhu)

---

Top Contributors

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

---

Tags

Flysystemlaravelgcslaravel7

### Embed Badge

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

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

###  Alternatives

[masbug/flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual&lt;=&gt;display path translation

2631.7M14](/packages/masbug-flysystem-google-drive-ext)[websight/l5-google-cloud-storage

Laravel 5 Flysystem Google Cloud Storage Service Provider

3662.2k](/packages/websight-l5-google-cloud-storage)[jerodev/flysystem-v3-smb-adapter

SMB adapter for Flysystem v3

1289.9k1](/packages/jerodev-flysystem-v3-smb-adapter)[bringyourownideas/laravel-backblaze

Backblaze B2 Cloud Storage for Laravel 5. Original by Paul Olthof (@hpolthof) continued by @bringyourownideas

1237.8k](/packages/bringyourownideas-laravel-backblaze)

PHPackages © 2026

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