Laravel Cloud Storage & CDN Config

•
12
•

Configures portable, environment-driven object storage in Laravel across AWS S3, Cloudflare R2, MinIO, and custom CDNs.

Streamlines Laravel filesystem and cloud object storage setups by establishing a portable environment configuration that effortlessly switches between AWS S3, Cloudflare R2, and local MinIO instances. It provides guidelines for handling path-style endpoints, routing media assets through custom CDN URLs, generating pre-signed URLs for secure uploads and downloads, and reliably mocking storage disks within automated test suites.

主要功能

01Path-style endpoint configuration for S3-compatible third-party storage providers
02Seamless switching between AWS S3, Cloudflare R2, and MinIO via environment variables
03Pre-signed URL generation patterns for direct, secure uploads and downloads
04Custom CDN endpoint integration and public asset URL generation helpers
05Automated storage disk mocking and ACL verification for unit and integration testing
0612 GitHub stars

使用场景

01Setting up a custom CDN domain in front of private cloud storage buckets for high-performance media delivery
02Writing reliable unit and integration tests for file upload pipelines using Laravel Storage fakes
03Switching from local MinIO storage in development to Cloudflare R2 or AWS S3 in production without code changes