Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Google Cloud Storage Laravel Package

spatie/laravel-google-cloud-storage

Laravel 9+ Google Cloud Storage filesystem driver using Flysystem v3 and a dedicated GCS adapter. Adds a gcs disk with service account key file/array support, project and bucket config, path prefixes, endpoints, and public/private visibility options.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Cloud Storage Strategy: Enables seamless integration with Google Cloud Storage (GCS) for Laravel applications, aligning with a multi-cloud or GCP-first storage strategy.
  • Cost Optimization: Reduces reliance on third-party S3-compatible services (e.g., AWS S3, DigitalOcean Spaces) by leveraging GCS’s pricing model, which may offer better value for high-volume or specific use cases (e.g., cold storage, regional pricing).
  • Performance & Scalability: Supports high-throughput file operations (e.g., media uploads, backups, CDN integration) with GCS’s global infrastructure and auto-scaling.
  • Roadmap Acceleration: Eliminates custom development time for GCS integration, allowing the team to focus on core features (e.g., AI/ML pipelines, analytics) that rely on scalable storage.
  • Build vs. Buy: Buy—avoids reinventing the wheel for GCS filesystem abstraction in Laravel, reducing technical debt and maintenance overhead.
  • Use Cases:
    • Media libraries (images, videos) for SaaS platforms.
    • Backup solutions for databases/filesystems.
    • CDN-optimized asset delivery (e.g., Next.js static assets, video streaming).
    • Serverless architectures (e.g., Cloud Functions triggering file processing).

When to Consider This Package

  • Adopt if:

    • Your Laravel app is GCP-native or migrating to GCP for cost/performance.
    • You need drop-in S3-compatible storage without vendor lock-in (uses Flysystem’s GCS adapter).
    • Your team lacks bandwidth to build/maintain a custom GCS filesystem driver.
    • You require Laravel 9+ compatibility with modern PHP (8.1+) and Flysystem v3.
    • Your use case aligns with GCS strengths: regional storage, lifecycle policies, or integration with other GCP services (e.g., Cloud CDN, Vision AI).
  • Look elsewhere if:

    • You’re locked into AWS S3 and don’t need multi-cloud flexibility (use fruitcake/laravel-jetstream or AWS SDK directly).
    • Your app uses Laravel <8 (use v1 branch or migrate to L9+).
    • You need advanced features like object versioning or legal holds (GCS may require custom logic; check GCS docs).
    • Your team prefers self-hosted solutions (e.g., MinIO, Ceph) for compliance/control.
    • You’re evaluating cost: Compare GCS pricing with alternatives (e.g., Backblaze B2, Wasabi) for your expected storage/bandwidth.

How to Pitch It (Stakeholders)

For Executives: "This package lets us leverage Google Cloud Storage as a drop-in replacement for file storage in our Laravel app—just like AWS S3, but with GCP’s pricing and performance. It cuts months of dev time, reduces cloud costs for high-volume storage (e.g., backups, media), and future-proofs our infrastructure for GCP services like AI or CDNs. With MIT licensing and Spatie’s track record, it’s a low-risk, high-reward move to accelerate our [X feature/roadmap]."

For Engineering: *"Spatie’s laravel-google-cloud-storage wraps Flysystem’s GCS adapter, giving us a battle-tested, Laravel-native way to use Google Cloud Storage. Key benefits:

  • Zero custom code: Works like Laravel’s built-in filesystem config (e.g., config/filesystems.php).
  • Performance: GCS’s global network + CDN integration for faster asset delivery.
  • Maintenance: MIT-licensed, actively updated (last release: 2026), and used by [X] other projects.
  • Flexibility: Supports signed URLs, lifecycle rules, and GCP’s regional storage tiers out of the box. Tradeoff: If we’re all-in on AWS, we’d stick with S3, but this gives us a portable, cost-effective alternative for [specific use case]."*

For Developers: *"This replaces storage:link/filesystem hacks with a clean GCS driver. Example setup:

// config/filesystems.php
'disks' => [
    'gcs' => [
        'driver' => 'gcs',
        'key' => env('GCS_KEY_FILE'),
        'bucket' => env('GCS_BUCKET'),
        'project_id' => env('GCS_PROJECT_ID'),
    ],
],

Then use it like any other disk:

Storage::disk('gcs')->put('file.txt', 'Hello, GCS!');

Pro tip: Pair with spatie/laravel-medialibrary for image/video management."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport