PHPackages                             websight/l5-google-cloud-storage - 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. websight/l5-google-cloud-storage

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

websight/l5-google-cloud-storage
================================

Laravel 5 Flysystem Google Cloud Storage Service Provider

v2.0.0(8y ago)3662.2k↓33.3%17[7 issues](https://github.com/websightgmbh/l5-google-cloud-storage/issues)MITPHP

Since Nov 27Pushed 8y ago3 watchersCompare

[ Source](https://github.com/websightgmbh/l5-google-cloud-storage)[ Packagist](https://packagist.org/packages/websight/l5-google-cloud-storage)[ Docs](https://github.com/websightgmbh/l5-google-cloud-storage)[ RSS](/packages/websight-l5-google-cloud-storage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (9)Used By (0)

Google Cloud Storage ServiceProvider for Laravel 5 Apps
=======================================================

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

[![Latest Stable Version](https://camo.githubusercontent.com/9c283c19308dcaf39c9005f2b77e9f029e743d6fa2814841ed81e48e5ff35932/68747470733a2f2f706f7365722e707567782e6f72672f77656273696768742f6c352d676f6f676c652d636c6f75642d73746f726167652f762f737461626c65)](https://packagist.org/packages/websight/l5-google-cloud-storage) [![Total Downloads](https://camo.githubusercontent.com/624235a288ee12057e7a306404498e54e492a45233b2b4bdebcda95582c7ec9f/68747470733a2f2f706f7365722e707567782e6f72672f77656273696768742f6c352d676f6f676c652d636c6f75642d73746f726167652f646f776e6c6f616473)](https://packagist.org/packages/websight/l5-google-cloud-storage) [![Latest Unstable Version](https://camo.githubusercontent.com/f44d96ad44d9efd5a5a2920f2c24ff951a8aca1c7ab084f87eaf653eb6a15d49/68747470733a2f2f706f7365722e707567782e6f72672f77656273696768742f6c352d676f6f676c652d636c6f75642d73746f726167652f762f756e737461626c65)](https://packagist.org/packages/websight/l5-google-cloud-storage) [![License](https://camo.githubusercontent.com/3ba3d5d7f8197212a73ed105502d4691f2e03eda5d6d62b9c1d996b478cbe538/68747470733a2f2f706f7365722e707567782e6f72672f77656273696768742f6c352d676f6f676c652d636c6f75642d73746f726167652f6c6963656e7365)](https://packagist.org/packages/websight/l5-google-cloud-storage)

Wraps [cedricziel/flysystem-gcs](https://github.com/cedricziel/flysystem-gcs) in a Laravel 5.x compatible Service Provider.

**Note:**This project doesn't support the deprecated `p12` credentials format anymore. If you rely on it, please use the `1.x` versions.

Configuration
-------------

[](#configuration)

*Dedicated credentials:* Obtain json service account credentials of a dedicated CloudPlatform Service Account

**or**

*Local authentication through gcloud:* Log in locally on your machine through the `gcloud` command-line utility.

- Add the service provider to your application in `config/app.php`

    ```
    Websight\GcsProvider\CloudStorageServiceProvider::class,
    ```
- Add a disk to the `disks` array in config/filesystems.php

    ```
    'gcs' => [
        // Select the Google Cloud Storage Disk
        'driver'         => 'gcs',
        // OPTIONAL: The location of the json service account certificate, see below
        // 'credentials' => storage_path('my-service-account-credentials.json'),
        // OPTIONAL: The GCP project id, see below
        // 'project_id'  => 'my-project-id-4711',
        // The bucket you want this disk to point at
        'bucket'         => 'my-project-id-4711.appspot.com',
    ],
    ```
- If Google Cloud Storage is the only `cloud` disk, you may consider setting it as the `cloud` disk, so that you can access it like `Storage::cloud()->$operation()` via `'cloud' => 'gcs',` in the `filesystems.php`config file.

Authentication and the different configuration options
------------------------------------------------------

[](#authentication-and-the-different-configuration-options)

Google Cloud Platform uses json credential files. For the use-case of this library, there are two different types that can easily confuse you.

1. credentials type `user`This is the type of credentials that identifies you as a user entity, most likely when authenticated through the `gcloud` utility. Since this type of credentials identifies users and users can belong to more than one project, you need to specify the `project_id` config option. The keys should automatically be detected through their well-known location.
2. credentials type `service_account`Service Account credentials are for authorizing machines and / or individual services to Google Cloud Platform. AppEngine instances and GCE machines already have a service account pre-installed so you don't need to configure neither `project_id` not `credentials`, since service accounts carry the information to which project they belong.

### When do I need to configure which option?

[](#when-do-i-need-to-configure-which-option)

Location`project_id``credentials``bucket`AppEngine (Standard &amp; Flex)*detected automatically**detected automatically*needs to be setDeployment to non-GCP machineneeds to be setneeds to be setneeds to be setLocal development with user credentialsneeds to be set*detected automatically*needs to be setLocal development with service account*detected automatically*needs to be setneeds to be setUsage
-----

[](#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
);

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

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% 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 ~121 days

Recently: every ~187 days

Total

8

Last Release

2969d ago

Major Versions

v1.1.0 → v2.0.02018-03-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ac8297e12671d91305ec01ab56add8cb141fa82d678ba96f0012eeb7f88ea0c?d=identicon)[cedricziel](/maintainers/cedricziel)

![](https://www.gravatar.com/avatar/7379ad0b2c4cb77e9ef7f03ad6e87432e64347f747c89b292e1a3a20197412d4?d=identicon)[tilman82](/maintainers/tilman82)

---

Top Contributors

[![cedricziel](https://avatars.githubusercontent.com/u/418970?v=4)](https://github.com/cedricziel "cedricziel (23 commits)")[![duffyboyo](https://avatars.githubusercontent.com/u/1912440?v=4)](https://github.com/duffyboyo "duffyboyo (1 commits)")[![jjiko](https://avatars.githubusercontent.com/u/713553?v=4)](https://github.com/jjiko "jjiko (1 commits)")[![retnek](https://avatars.githubusercontent.com/u/1765261?v=4)](https://github.com/retnek "retnek (1 commits)")[![robclancy](https://avatars.githubusercontent.com/u/857111?v=4)](https://github.com/robclancy "robclancy (1 commits)")[![wammy21](https://avatars.githubusercontent.com/u/17343030?v=4)](https://github.com/wammy21 "wammy21 (1 commits)")

---

Tags

flysystemflysystem-adaptergoogle-cloud-storageFlysystemlaravellumenlaravel5

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/websight-l5-google-cloud-storage/health.svg)

```
[![Health](https://phpackages.com/badges/websight-l5-google-cloud-storage/health.svg)](https://phpackages.com/packages/websight-l5-google-cloud-storage)
```

###  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.9M12](/packages/spatie-laravel-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)
