PHPackages                             subhashladumor/laravel-multicloud - 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. subhashladumor/laravel-multicloud

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

subhashladumor/laravel-multicloud
=================================

Laravel MultiCloud — manage AWS, Azure, GCP, Cloudinary, Alibaba &amp; Cloudflare in one Laravel package. Deploy, backup, scale, monitor, and optimize cloud apps with a single unified API.

1.0.1(8mo ago)211MITPHPPHP ^8.0

Since Oct 12Pushed 8mo agoCompare

[ Source](https://github.com/subhashladumor1/laravel-multicloud)[ Packagist](https://packagist.org/packages/subhashladumor/laravel-multicloud)[ GitHub Sponsors](https://github.com/subhashladumor1)[ Patreon](https://www.patreon.com/subhashladumor1)[ RSS](/packages/subhashladumor-laravel-multicloud/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (12)Versions (4)Used By (0)

🚀 Laravel MultiCloud
====================

[](#-laravel-multicloud)

[![Latest Version](https://camo.githubusercontent.com/b26baa910a8b48996b0848ae8e1cbc09200267bf359a2bcdb582c6b39e03b1ab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737562686173686c6164756d6f722f6c61726176656c2d6d756c7469636c6f75642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subhashladumor/laravel-multicloud)[![PHP Version](https://camo.githubusercontent.com/86d78c3caab7ad314cfa93135c4a5ce37dd4e249659f65d00ef2f5c3aaadb6b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f737562686173686c6164756d6f722f6c61726176656c2d6d756c7469636c6f75642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subhashladumor/laravel-multicloud)[![Laravel Version](https://camo.githubusercontent.com/19d5bb0370853f3f5f64da8e47f7b2e14803b7fa5f7c8d04e347ac6849edb9ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d7265642e7376673f7374796c653d666c61742d737175617265)](https://laravel.com)

> **Unified Laravel package to manage and integrate multiple cloud providers (AWS, Azure, GCP, Cloudinary, Alibaba Cloud, Cloudflare) using a single, consistent API layer.**

🌟 Features
----------

[](#-features)

- **🔄 Multi-Provider Support**: Seamlessly work with 6 major cloud providers
- **🎯 Unified API**: Single interface for all cloud operations
- **⚡ Easy Integration**: Simple Laravel facade and service provider
- **🛡️ Type Safety**: Full PHP 8.1+ type declarations
- **📊 Usage Analytics**: Built-in usage tracking and cost monitoring
- **🔧 Artisan Commands**: Deploy and monitor via command line
- **🌐 HTTP API**: RESTful endpoints for web applications
- **🧪 Tested**: Comprehensive test suite included
- **📚 Well Documented**: Extensive documentation and examples

🏗️ Supported Cloud Providers
----------------------------

[](#️-supported-cloud-providers)

ProviderStatusFeatures**AWS S3**✅Upload, Download, Delete, List, Signed URLs**Microsoft Azure**✅Blob Storage, Container Management**Google Cloud Platform**✅Cloud Storage, Bucket Operations**Cloudinary**✅Image/Video Management, Transformations**Alibaba Cloud**✅Object Storage Service (OSS)**Cloudflare**✅R2 Storage, Custom Domains📦 Installation
--------------

[](#-installation)

### Via Composer

[](#via-composer)

```
composer require subhashladumor/laravel-multicloud
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="Subhashladumor\LaravelMulticloud\LaravelMulticloudServiceProvider" --tag="multicloud-config"
```

### Environment Variables

[](#environment-variables)

Add your cloud provider credentials to your `.env` file:

```
# Default Provider
MULTICLOUD_DEFAULT=aws

# AWS Configuration
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your-bucket-name

# Azure Configuration
AZURE_STORAGE_ACCOUNT_NAME=your-account-name
AZURE_STORAGE_ACCOUNT_KEY=your-account-key
AZURE_STORAGE_CONTAINER=your-container-name

# GCP Configuration
GCP_PROJECT_ID=your-project-id
GCP_BUCKET=your-bucket-name
GCP_KEY_FILE=path/to/service-account.json

# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret

# Alibaba Cloud Configuration
ALIBABA_ACCESS_KEY_ID=your-access-key-id
ALIBABA_ACCESS_KEY_SECRET=your-access-key-secret
ALIBABA_OSS_ENDPOINT=your-endpoint
ALIBABA_OSS_BUCKET=your-bucket-name

# Cloudflare Configuration
CLOUDFLARE_ACCOUNT_ID=your-account-id
CLOUDFLARE_ACCESS_KEY_ID=your-access-key-id
CLOUDFLARE_SECRET_ACCESS_KEY=your-secret-access-key
CLOUDFLARE_BUCKET=your-bucket-name
CLOUDFLARE_CUSTOM_DOMAIN=your-custom-domain.com
```

🚀 Quick Start
-------------

[](#-quick-start)

### Basic Usage

[](#basic-usage)

```
use Subhashladumor\LaravelMulticloud\Facades\LaravelMulticloud;

// Upload a file using default provider
$result = LaravelMulticloud::upload('images/photo.jpg', $fileContent);

// Upload to specific provider
$result = LaravelMulticloud::driver('gcp')->upload('documents/file.pdf', $fileContent);

// Download a file
$content = LaravelMulticloud::download('images/photo.jpg');

// Delete a file
$result = LaravelMulticloud::delete('images/photo.jpg');

// List files
$files = LaravelMulticloud::list('images/');

// Check if file exists
$exists = LaravelMulticloud::exists('images/photo.jpg');

// Get file metadata
$metadata = LaravelMulticloud::getMetadata('images/photo.jpg');

// Generate signed URL
$signedUrl = LaravelMulticloud::generateSignedUrl('images/photo.jpg', 3600);

// Get usage statistics
$usage = LaravelMulticloud::getUsage();

// Test connection
$connection = LaravelMulticloud::testConnection();
```

### Advanced Usage

[](#advanced-usage)

```
use Subhashladumor\LaravelMulticloud\Facades\LaravelMulticloud;

// Upload with options
$result = LaravelMulticloud::driver('aws')->upload('images/photo.jpg', $fileContent, [
    'ACL' => 'public-read',
    'CacheControl' => 'max-age=31536000',
    'ContentType' => 'image/jpeg',
]);

// List files with options
$files = LaravelMulticloud::driver('azure')->list('documents/', [
    'prefix' => '2024/',
    'max_keys' => 100,
]);

// Download to local path
$result = LaravelMulticloud::driver('gcp')->download('backup/data.zip', '/tmp/data.zip');

// Get all available providers
$providers = LaravelMulticloud::getAvailableDrivers();
```

🎯 Artisan Commands
------------------

[](#-artisan-commands)

### Deploy Command

[](#deploy-command)

```
# Deploy to default provider
php artisan cloud:deploy

# Deploy to specific provider
php artisan cloud:deploy --provider=aws

# Deploy to specific environment and region
php artisan cloud:deploy --provider=gcp --environment=staging --region=us-central1

# Dry run deployment
php artisan cloud:deploy --provider=azure --dry-run
```

### Usage Command

[](#usage-command)

```
# Show usage for default provider
php artisan cloud:usage

# Show usage for specific provider
php artisan cloud:usage --provider=aws

# Show detailed usage information
php artisan cloud:usage --provider=gcp --detailed

# Show usage for all providers
php artisan cloud:usage --all

# Export usage data
php artisan cloud:usage --provider=azure --format=json
php artisan cloud:usage --all --format=csv
```

🌐 HTTP API Endpoints
--------------------

[](#-http-api-endpoints)

The package provides RESTful API endpoints for web applications:

```
# File Operations
POST   /api/multicloud/upload          # Upload file
GET    /api/multicloud/download       # Download file
DELETE /api/multicloud/delete          # Delete file
GET    /api/multicloud/list           # List files
GET    /api/multicloud/exists         # Check file exists
GET    /api/multicloud/metadata       # Get file metadata
GET    /api/multicloud/signed-url     # Generate signed URL

# Provider Operations
GET    /api/multicloud/usage          # Get usage statistics
GET    /api/multicloud/test-connection # Test provider connection
GET    /api/multicloud/providers      # List available providers
```

### API Examples

[](#api-examples)

```
# Upload file
curl -X POST http://your-app.com/api/multicloud/upload \
  -F "file=@photo.jpg" \
  -F "path=images/photo.jpg" \
  -F "provider=aws"

# Download file
curl -X GET "http://your-app.com/api/multicloud/download?path=images/photo.jpg&provider=aws"

# Generate signed URL
curl -X GET "http://your-app.com/api/multicloud/signed-url?path=images/photo.jpg&expiration=3600"

# Get usage statistics
curl -X GET "http://your-app.com/api/multicloud/usage?provider=aws"
```

🔧 Configuration
---------------

[](#-configuration)

### Provider Configuration

[](#provider-configuration)

```
// config/multicloud.php
return [
    'default' => 'aws',

    'providers' => [
        'aws' => [
            'key' => env('AWS_ACCESS_KEY_ID'),
            'secret' => env('AWS_SECRET_ACCESS_KEY'),
            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
            'bucket' => env('AWS_BUCKET'),
            'options' => [
                'ACL' => 'private',
                'CacheControl' => 'max-age=31536000',
            ],
        ],
        // ... other providers
    ],

    'settings' => [
        'upload' => [
            'max_file_size' => 10485760, // 10MB
            'allowed_extensions' => ['jpg', 'png', 'pdf', 'doc'],
        ],
        'cache' => [
            'enabled' => true,
            'ttl' => 3600,
        ],
    ],
];
```

### Fallback Configuration

[](#fallback-configuration)

```
'fallback' => [
    'enabled' => true,
    'providers' => [
        'aws' => ['azure', 'gcp'],
        'azure' => ['aws', 'gcp'],
        'gcp' => ['aws', 'azure'],
    ],
    'max_retries' => 3,
    'retry_delay' => 1000, // milliseconds
],
```

🧪 Testing
---------

[](#-testing)

Run the test suite:

```
# Run all tests
composer test

# Run with coverage
composer test-coverage

# Run specific test
phpunit tests/CloudTest.php
```

📊 Usage Examples
----------------

[](#-usage-examples)

### File Upload with Progress

[](#file-upload-with-progress)

```
use Subhashladumor\LaravelMulticloud\Facades\LaravelMulticloud;

// Upload large file with progress tracking
$file = request()->file('large_file');
$path = 'uploads/' . $file->getClientOriginalName();

$result = LaravelMulticloud::driver('aws')->upload($path, $file->getContent(), [
    'ACL' => 'public-read',
    'ContentType' => $file->getMimeType(),
]);

if ($result['status'] === 'success') {
    return response()->json([
        'message' => 'File uploaded successfully',
        'url' => $result['url'],
        'size' => $result['size'],
    ]);
}
```

### Batch Operations

[](#batch-operations)

```
use Subhashladumor\LaravelMulticloud\Facades\LaravelMulticloud;

// Upload multiple files
$files = request()->file('files');
$results = [];

foreach ($files as $file) {
    $path = 'uploads/' . time() . '_' . $file->getClientOriginalName();
    $result = LaravelMulticloud::upload($path, $file->getContent());
    $results[] = $result;
}

return response()->json(['uploads' => $results]);
```

### Image Processing with Cloudinary

[](#image-processing-with-cloudinary)

```
use Subhashladumor\LaravelMulticloud\Facades\LaravelMulticloud;

// Upload image with transformations
$result = LaravelMulticloud::driver('cloudinary')->upload('images/photo.jpg', $imageContent, [
    'transformation' => [
        'width' => 800,
        'height' => 600,
        'crop' => 'fill',
        'quality' => 'auto',
        'format' => 'auto',
    ],
]);

// Generate different image sizes
$thumbnailUrl = LaravelMulticloud::driver('cloudinary')->generateSignedUrl('images/photo.jpg', 3600);
```

### Backup Operations

[](#backup-operations)

```
use Subhashladumor\LaravelMulticloud\Facades\LaravelMulticloud;

// Create database backup
$backupFile = 'backups/db_backup_' . date('Y-m-d_H-i-s') . '.sql';
$backupContent = shell_exec('mysqldump --all-databases');

$result = LaravelMulticloud::driver('gcp')->upload($backupFile, $backupContent, [
    'ContentType' => 'application/sql',
    'CacheControl' => 'no-cache',
]);

// Schedule cleanup of old backups
$oldBackups = LaravelMulticloud::driver('gcp')->list('backups/');
foreach ($oldBackups['files'] as $file) {
    if (strtotime($file['last_modified']) < strtotime('-30 days')) {
        LaravelMulticloud::driver('gcp')->delete($file['path']);
    }
}
```

🔒 Security Features
-------------------

[](#-security-features)

- **Encrypted Uploads**: Optional encryption for sensitive files
- **Signed URLs**: Secure temporary access to files
- **Access Control**: Configurable ACL and permissions
- **Input Validation**: Comprehensive request validation
- **Rate Limiting**: Built-in rate limiting for API endpoints

🚀 Performance Optimization
--------------------------

[](#-performance-optimization)

- **Caching**: Built-in caching for metadata and usage stats
- **Parallel Operations**: Support for concurrent uploads/downloads
- **CDN Integration**: Automatic CDN configuration
- **Compression**: Automatic file compression for supported formats
- **Lazy Loading**: On-demand provider initialization

📈 Monitoring &amp; Analytics
----------------------------

[](#-monitoring--analytics)

- **Usage Tracking**: Detailed usage statistics for each provider
- **Cost Monitoring**: Real-time cost tracking and alerts
- **Performance Metrics**: Upload/download speed monitoring
- **Error Tracking**: Comprehensive error logging and reporting
- **Health Checks**: Automated provider health monitoring

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

### Development Setup

[](#development-setup)

```
# Clone the repository
git clone https://github.com/subhashladumor/laravel-multicloud.git

# Install dependencies
composer install

# Run tests
composer test

# Run code quality checks
composer check
```

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

🆘 Support
---------

[](#-support)

- **Documentation**: [Full Documentation](https://github.com/subhashladumor1/laravel-multicloud/blob/main/docs/README.md)
- **Issues**: [GitHub Issues](https://github.com/subhashladumor/laravel-multicloud/issues)
- **Discussions**: [GitHub Discussions](https://github.com/subhashladumor/laravel-multicloud/discussions)

🙏 Acknowledgments
-----------------

[](#-acknowledgments)

- Laravel Framework Team
- All Cloud Provider SDKs
- Open Source Community
- Contributors and Testers

---

**Made with ❤️ by [Subhash Ladumor](https://github.com/subhashladumor)**

[⭐ Star this repo](https://github.com/subhashladumor/laravel-multicloud) | [🐛 Report Bug](https://github.com/subhashladumor/laravel-multicloud/issues) | [💡 Request Feature](https://github.com/subhashladumor/laravel-multicloud/issues)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance59

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

265d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

alibaba-cloudalibabacloudawsaws-s3aws-sdkcloud-sdk-googlegooglecloudplatformlaravel-awslaravel-azurelaravel-cloud-laravel-cloud-storagelaravel-cloudflarelaravel-cloudinarylaravel-gcpphp-cloudlaravelawscloudstorageazuredevopscloudflarecloudinarydeploymentgcpalibabamulticloud

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/subhashladumor-laravel-multicloud/health.svg)

```
[![Health](https://phpackages.com/badges/subhashladumor-laravel-multicloud/health.svg)](https://phpackages.com/packages/subhashladumor-laravel-multicloud)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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