PHPackages                             rocksolid/flysystem-azure-blob-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. rocksolid/flysystem-azure-blob-storage

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

rocksolid/flysystem-azure-blob-storage
======================================

Azure Blob Storage adapter for Flysystem v3

v1.0.1(4mo ago)0225↓50%MITPHPPHP ^8.2

Since Dec 24Pushed 4mo agoCompare

[ Source](https://github.com/rocksolid-dev/flysystem-azure-blob-storage)[ Packagist](https://packagist.org/packages/rocksolid/flysystem-azure-blob-storage)[ RSS](/packages/rocksolid-flysystem-azure-blob-storage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Azure Blob Storage Adapter for Laravel
======================================

[](#azure-blob-storage-adapter-for-laravel)

A Laravel Flysystem adapter for Azure Blob Storage using direct HTTP REST API calls (no SDK required).

Features
--------

[](#features)

- Full Flysystem v3 compatibility
- Direct Azure REST API integration using Guzzle
- Shared Key authentication
- Support for all standard file operations
- Laravel auto-discovery support
- No external Azure SDK dependencies

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11.0 or higher
- GuzzleHttp 7.0 or higher
- League Flysystem 3.0 or higher

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

[](#installation)

```
composer require rocksolid/azure-blob-storage
```

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

[](#configuration)

### 1. Add Azure credentials to your `.env` file:

[](#1-add-azure-credentials-to-your-env-file)

```
AZURE_STORAGE_ACCOUNT_NAME=your-account-name
AZURE_STORAGE_ACCOUNT_KEY=your-account-key
AZURE_STORAGE_CONTAINER=your-container-name
```

### 2. Add a disk configuration to `config/filesystems.php`:

[](#2-add-a-disk-configuration-to-configfilesystemsphp)

```
'disks' => [
    // ... other disks

    'azure' => [
        'driver' => 'azure-blob',
        'account_name' => env('AZURE_STORAGE_ACCOUNT_NAME'),
        'account_key' => env('AZURE_STORAGE_ACCOUNT_KEY'),
        'container' => env('AZURE_STORAGE_CONTAINER'),
    ],
],
```

Usage
-----

[](#usage)

### Basic File Operations

[](#basic-file-operations)

```
use Illuminate\Support\Facades\Storage;

// Upload a file
Storage::disk('azure')->put('path/to/file.txt', 'File contents');

// Read a file
$contents = Storage::disk('azure')->get('path/to/file.txt');

// Check if file exists
$exists = Storage::disk('azure')->exists('path/to/file.txt');

// Delete a file
Storage::disk('azure')->delete('path/to/file.txt');

// List files
$files = Storage::disk('azure')->files('directory');

// List all files recursively
$allFiles = Storage::disk('azure')->allFiles('directory');
```

### Streaming Operations

[](#streaming-operations)

```
// Upload from stream
$stream = fopen('local-file.txt', 'r');
Storage::disk('azure')->writeStream('path/to/file.txt', $stream);
fclose($stream);

// Download as stream
$stream = Storage::disk('azure')->readStream('path/to/file.txt');
```

### Directory Operations

[](#directory-operations)

Azure Blob Storage does not have real directories, but you can simulate them using empty files.

```
// Create directory (creates a placeholder file)
Storage::disk('azure')->makeDirectory('path/to/directory');

// Check if directory exists
$exists = Storage::disk('azure')->directoryExists('path/to/directory');

// Delete directory
Storage::disk('azure')->deleteDirectory('path/to/directory');
```

### File Metadata

[](#file-metadata)

```
// Get file size
$size = Storage::disk('azure')->size('path/to/file.txt');

// Get last modified time
$timestamp = Storage::disk('azure')->lastModified('path/to/file.txt');

// Get MIME type
$mimeType = Storage::disk('azure')->mimeType('path/to/file.txt');
```

### Copy and Move

[](#copy-and-move)

```
// Copy file
Storage::disk('azure')->copy('path/to/source.txt', 'path/to/destination.txt');

// Move file
Storage::disk('azure')->move('path/to/source.txt', 'path/to/destination.txt');
```

Testing
-------

[](#testing)

This package includes comprehensive integration tests using the League Flysystem adapter test utilities.

### Running Tests

[](#running-tests)

1. Install development dependencies:

```
composer install --dev
```

2. Configure your Azure credentials by copying `phpunit.xml.dist` to `phpunit.xml`:

```
cp phpunit.xml.dist phpunit.xml
```

3. Update the environment variables in `phpunit.xml` with your Azure Storage credentials:

```

```

**Important:** Make sure the test container exists in your Azure Storage account before running tests.

4. Run the test suite:

```
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

Credits
-------

[](#credits)

Developed by Rocksolid Development

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance75

Regular maintenance activity

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

139d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

Flysystemlaravelstorageazureblob-storage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rocksolid-flysystem-azure-blob-storage/health.svg)

```
[![Health](https://phpackages.com/badges/rocksolid-flysystem-azure-blob-storage/health.svg)](https://phpackages.com/packages/rocksolid-flysystem-azure-blob-storage)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[masbug/flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual&lt;=&gt;display path translation

2631.7M14](/packages/masbug-flysystem-google-drive-ext)

PHPackages © 2026

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