PHPackages                             bangnokia/laravel-bunny-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. bangnokia/laravel-bunny-storage

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

bangnokia/laravel-bunny-storage
===============================

Use Bunny Storage in Laravel application

v2.2.0(3mo ago)725.7k↑17.4%1MITPHPCI passing

Since Mar 4Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/bangnokia/laravel-bunny-storage)[ Packagist](https://packagist.org/packages/bangnokia/laravel-bunny-storage)[ RSS](/packages/bangnokia-laravel-bunny-storage/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (13)Versions (18)Used By (0)

[![](https://camo.githubusercontent.com/e8fcd09587109acd86262b24e3bf29d19c2e208284e712ad05dd60bf4a4b8cb6/68747470733a2f2f62756e6e792e6e65742f7374617469632f62756e6e796e65742d6461726b2d64366134313236306231653462363635636232646334313365336562383463612e737667)](https://camo.githubusercontent.com/e8fcd09587109acd86262b24e3bf29d19c2e208284e712ad05dd60bf4a4b8cb6/68747470733a2f2f62756e6e792e6e65742f7374617469632f62756e6e796e65742d6461726b2d64366134313236306231653462363635636232646334313365336562383463612e737667)

Bunny Storage for Laravel
=========================

[](#bunny-storage-for-laravel)

This package is just a wrapper for Laravel of the [flysystem-bunnycdn](https://github.com/PlatformCommunity/flysystem-bunnycdn) package for simple integration with Laravel.

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

[](#installation)

```
composer require bangnokia/laravel-bunny-storage
```

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

[](#configuration)

This package automatically register the service provider and the storage disk for the driver `bunny`. You can configure the disk in `config/filesystems.php`:

```
'bunny' => [
    'driver' => 'bunny',
    'storage_zone' => env('BUNNY_STORAGE_ZONE'),
    'api_key' => env('BUNNY_API_KEY'),
    'region' => env('BUNNY_REGION', \PlatformCommunity\Flysystem\BunnyCDN\BunnyCDNRegion::DEFAULT),
    'token_auth_key' => env('BUNNY_TOKEN_AUTH_KEY'), // optional if you want to generate temporaryUrls
    'pull_zone' => env('BUNNY_PULL_ZONE', ''), // optional if you want to access the file publicly
    'root' => '', // optional, you could set a specific folder for upload like '/uploads'
],
```

and remember to add the environment variables in your `.env` file:

```
BUNNY_STORAGE_ZONE=your-storage-zone-name
BUNNY_API_KEY=your-api-key (it's password in bunny)
#BUNNY_REGION=your-region (optional)
#BUNNY_PULL_ZONE="https://your-pull-zone-url" (optional if you want to access the file publicly)
#BUNNY_TOKEN_AUTH_KEY=your-key (optional, CDN > Security > Token authentication > Url token authentication key)
```

Usage
-----

[](#usage)

```
Storage::disk('bunny')->put('index.html', 'Hello World');

return response(Storage::disk('bunny')->get('index.html'));
```

Streaming Support
-----------------

[](#streaming-support)

This package includes **streaming support** for large file uploads, which significantly reduces memory usage.

### Memory Efficient Uploads

[](#memory-efficient-uploads)

When uploading large files (e.g., database backups, videos), the streaming adapter automatically:

1. Detects when a file stream/resource is provided
2. Streams the file directly to BunnyCDN without loading into memory
3. Reduces memory usage from O(file\_size) to O(buffer\_size)

### Example: Large File Upload

[](#example-large-file-upload)

```
// Efficient streaming - memory stays low (~8-16MB buffer)
$stream = fopen('/path/to/large-file.zip', 'r');
Storage::disk('bunny')->put('backup.zip', $stream);
fclose($stream);

// This also works with writeStream
Storage::disk('bunny')->writeStream('backup.zip', $stream);
```

Regions
-------

[](#regions)

For a full region list, please visit the [BunnyCDN API documentation page](https://docs.bunny.net/reference/regionpublic_index).

`flysystem-bunnycdn` also comes with constants for each region located within `PlatformCommunity\Flysystem\BunnyCDN\BunnyCDNRegion`.

```
# Europe
BunnyCDNRegion::FALKENSTEIN = 'de';
BunnyCDNRegion::STOCKHOLM = 'se';

# United Kingdom
BunnyCDNRegion::UNITED_KINGDOM = 'uk';

# USA
BunnyCDNRegion::NEW_YORK = 'ny';
BunnyCDNRegion::LOS_ANGELAS = 'la';

# SEA
BunnyCDNRegion::SINGAPORE = 'sg';

# Oceania
BunnyCDNRegion::SYDNEY = 'syd';

# Africa
BunnyCDNRegion::JOHANNESBURG = 'jh';

# South America
BunnyCDNRegion::BRAZIL = 'br';
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.6% 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 ~49 days

Recently: every ~86 days

Total

16

Last Release

107d ago

Major Versions

v0.1.4 → v1.3.12024-04-15

v1.3.3 → v2.0.02025-03-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5652494?v=4)[Nguyen Viet](/maintainers/bangnokia)[@bangnokia](https://github.com/bangnokia)

---

Top Contributors

[![bangnokia](https://avatars.githubusercontent.com/u/5652494?v=4)](https://github.com/bangnokia "bangnokia (31 commits)")[![chrispage1](https://avatars.githubusercontent.com/u/2487374?v=4)](https://github.com/chrispage1 "chrispage1 (4 commits)")

---

Tags

bunnybunnycdnbunnystoragelaravel

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/bangnokia-laravel-bunny-storage/health.svg)

```
[![Health](https://phpackages.com/badges/bangnokia-laravel-bunny-storage/health.svg)](https://phpackages.com/packages/bangnokia-laravel-bunny-storage)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M201](/packages/laravel-ai)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[illuminate/view

The Illuminate View package.

13047.0M2.2k](/packages/illuminate-view)[illuminate/session

The Illuminate Session package.

9939.3M850](/packages/illuminate-session)

PHPackages © 2026

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