PHPackages                             novay/bunny-secrets - 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. novay/bunny-secrets

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

novay/bunny-secrets
===================

Laravel package for BunnyCDN secrets management and filesystem integration with Borneo Secrets Manager.

1.01(1mo ago)032MITPHPPHP ^8.1

Since Aug 13Pushed 1mo agoCompare

[ Source](https://github.com/novay/bunny-secrets)[ Packagist](https://packagist.org/packages/novay/bunny-secrets)[ Docs](https://github.com/novay/bunny-secrets)[ RSS](/packages/novay-bunny-secrets/feed)WikiDiscussions main Synced today

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

\[Personal use\] Bunny Secrets
==============================

[](#personal-use-bunny-secrets)

This Laravel package provides a seamless integration with **BunnyCDN** for both secret management and filesystem operations. It allows you to easily upload, delete, and retrieve files from your BunnyCDN Storage Zone while securely managing your API keys.

Key Features
------------

[](#key-features)

- **Secrets Management:** Fetch and store API keys and other secrets from an external service.
- **Flysystem Driver:** Full integration with Laravel's filesystem (leveraging `platformcommunity/flysystem-bunnycdn`).
- **File Operations:** Effortlessly upload, retrieve public URLs, and delete files on BunnyCDN.
- **ImageKit Support:** Optionally, transform image URLs to utilize BunnyCDN's ImageKit.io features.
- **Service Provider:** Automatic configuration for Laravel 10.0 and above.

---

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

[](#requirements)

- **PHP:** ^8.2
- **Laravel Framework:** ^10.0
- API from Borneo Secrets Manager

---

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

[](#installation)

You can install the package via Composer:

```
composer require novay/bunny-secrets
```

After installation, the `BunnySecretServiceProvider` will be automatically discovered and registered by Laravel.

---

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

[](#configuration)

To publish the `bunnycdn.php` configuration file, run the following Artisan command:

```
php artisan vendor:publish --tag=bunny-secrets-config
```

The configuration file will be located at `config/bunnycdn.php`. Make sure to populate the necessary environment variables in your `.env` file, such as `BUNNYCDN_API_KEY` and `BUNNYCDN_STORAGE_ZONE`.

Example `.env` configuration:

```
# BunnyCDN Storage Zone & API Key
BUNNYCDN_STORAGE_ZONE="your-storage-zone-name"
BUNNYCDN_API_KEY="your-api-key"
BUNNYCDN_REGION="sg" # e.g., 'de', 'ny', 'la', 'sao', 'syd', 'singapore', 'london', 'tokyo'
BUNNYCDN_CDN_URL="https://your-cdn-hostname.b-cdn.net"

# Secret API Service
SECRET_URI="https://api.your-secret-service.com"
SECRET_KEY="your-secret-service-api-key"

# Secret File & Key
BUNNY_SECRET_FILE="bunny_api_key.txt"
BUNNY_SECRET_KEY="bunny-secrets-pass"
```

---

Usage
-----

[](#usage)

You can access the package's functionality through the **`BunnySecret` Facade**.

```
use Novay\BunnySecret\BunnySecret;
use Illuminate\Http\UploadedFile;

// Upload a file to BunnyCDN
$filePath = BunnySecret::uploadCDN(
  file: $this->photo,
  path: 'berau/sudik/avatar',
  filename: str()->slug('filename').'-'.uniqid()
);
if ($filePath === false) {
  throw new \Exception("Failed to upload photo to CDN.");
}

// Get the public URL of the file
$fileUrl = BunnySecret::showCDN($filePath);
echo "Public file URL: " . $fileUrl;

// Transform an image URL with ImageKit (if configured)
$imageUrl = 'https://s3-url/images/my-image.jpg';
$resizedImageUrl = BunnySecret::imageKit($imageUrl, 800);
echo "Transformed image URL: " . $resizedImageUrl;

// Delete a file
$isDeleted = BunnySecret::deleteCDN(filePath: $filePath);
if ($isDeleted) {
    echo "File deleted successfully.";
}
```

### Accessing via the `Storage` Facade

[](#accessing-via-the-storage-facade)

Since this package provides a custom Flysystem driver, you can also use Laravel's `Storage` Facade with the `bunnycdn` disk.

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

// Upload a file
$fileContent = file_get_contents('path/to/your/local/file.jpg');
Storage::disk('bunnycdn')->put('images/file.jpg', $fileContent);

// Get a public URL
$url = Storage::disk('bunnycdn')->url('images/file.jpg');

// Delete a file
Storage::disk('bunnycdn')->delete('images/file.jpg');
```

---

License
-------

[](#license)

This package is licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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 ~274 days

Total

2

Last Release

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/712577?v=4)[Novianto Rahmadi](/maintainers/novay)[@novay](https://github.com/novay)

---

Top Contributors

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

---

Tags

filesystemlaravelsecretsbunnyCDN

### Embed Badge

![Health badge](/badges/novay-bunny-secrets/health.svg)

```
[![Health](https://phpackages.com/badges/novay-bunny-secrets/health.svg)](https://phpackages.com/packages/novay-bunny-secrets)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)

PHPackages © 2026

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