PHPackages                             pkboom/google-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. pkboom/google-storage

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

pkboom/google-storage
=====================

00PHP

Since Aug 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/pkboom/google-storage)[ Packagist](https://packagist.org/packages/pkboom/google-storage)[ RSS](/packages/pkboom-google-storage/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Manage Google Storage Bucket for Laravel applications
=====================================================

[](#manage-google-storage-bucket-for-laravel-applications)

[![Latest Stable Version](https://camo.githubusercontent.com/8721397ef58eea2efeab2ef861d2d4f25e38e1c9d8e3521a78e8562dc10af57a/68747470733a2f2f706f7365722e707567782e6f72672f706b626f6f6d2f676f6f676c652d73746f726167652f76)](//packagist.org/packages/pkboom/google-storage)[![Total Downloads](https://camo.githubusercontent.com/2bdaea4b447d16511ed5dc574d2c9d033fe5e963cd6fdd207ab7117222d353b6/68747470733a2f2f706f7365722e707567782e6f72672f706b626f6f6d2f676f6f676c652d73746f726167652f646f776e6c6f616473)](//packagist.org/packages/pkboom/google-storage)

This package makes working with Google Storage a breeze. Once it has been set up you can do these things:

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

[](#installation)

You can install the package via composer:

```
composer require pkboom/google-storage
```

You must publish the configuration with this command:

```
php artisan vendor:publish --provider="Pkboom\GoogleStorage\GoogleStorageServiceProvider"
```

This will publish a file called google-storage.php in your config-directory with these contents:

```
return [
    /*
     * Path to the json file containing the credentials.
     */
    'service_account_credentials_json' => storage_path('app/service-account/credentials.json'),
];
```

How to obtain the credentials to communicate with Google Storage
----------------------------------------------------------------

[](#how-to-obtain-the-credentials-to-communicate-with-google-storage)

[how to obtain the credentials to communicate with google calendar](https://github.com/spatie/laravel-google-calendar#how-to-obtain-the-credentials-to-communicate-with-google-calendar)

[Cloud Storage authentication](https://cloud.google.com/storage/docs/authentication)

Usage
-----

[](#usage)

### Manage buckets

[](#manage-buckets)

```
use Pkboom\GoogleStorage\Facades\Bucket;

// buckets list
foreach (Bucket::all() as $bucket) {
    $results[] = $bucket->name();
}

// find a bucket
$bucket = Bucket::find($bucketName);

// objects list
foreach ($bucket->objects() as $object) {
    $results[] = $object->name();
}

// objects with a prefix(directory)
foreach ($bucket->prefix($prefix)->objects() as $object) {
    $results[] = $object->name();
}

// create a bucket
try {
    $bucket = Bucket::create($bucketName);
} catch (Exception $e) {
    return response($e->getMessage(), $e->getCode());
}

// delete a bucket
$bucket->delete();

// upload an object
$bucket->upload($filePath);
$bucket->as($newName)->upload($filePath);

// copy an object
$bucket->copy($bucketName);
$bucket->as('backup/'.$newName)->copy($bucketName);

// move an object
$bucket->move($bucketName);
$bucket->as('backup/'.$newName)->move($bucketName);
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/pkboom-google-storage/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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