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(2mo ago)617.9k—5.5%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 1mo 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 94% of packages

Maintenance83

Actively maintained with recent releases

Popularity33

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

60d ago

Major Versions

v0.1.4 → v1.3.12024-04-15

v1.3.3 → v2.0.02025-03-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/66da34ae32eba55e163bd3cdabd731c8462665845678a096a2b55a4743b597f7?d=identicon)[bangnokia](/maintainers/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

[unisharp/laravel-filemanager

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

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[spatie/laravel-google-cloud-storage

Google Cloud Storage filesystem driver for Laravel

2408.9M13](/packages/spatie-laravel-google-cloud-storage)[azure-oss/storage-blob-laravel

Azure Storage Blob filesystem driver for Laravel

63582.2k1](/packages/azure-oss-storage-blob-laravel)[zing/laravel-flysystem-obs

Flysystem Adapter for OBS

1211.2k](/packages/zing-laravel-flysystem-obs)

PHPackages © 2026

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