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.0(9mo ago)025MITPHPPHP ^8.1

Since Aug 13Pushed 9mo 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 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)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

31

—

LowBetter than 68% of packages

Maintenance58

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

278d 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 (2 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

[oneduo/nova-file-manager

A handy file manager tool for Laravel Nova

157350.3k2](/packages/oneduo-nova-file-manager)[singlequote/laravel-webdav

1344.8k](/packages/singlequote-laravel-webdav)[yoelpc4/laravel-cloudinary

Laravel Cloudinary filesystem cloud driver.

3343.0k](/packages/yoelpc4-laravel-cloudinary)[bringyourownideas/laravel-backblaze

Backblaze B2 Cloud Storage for Laravel 5. Original by Paul Olthof (@hpolthof) continued by @bringyourownideas

1237.8k](/packages/bringyourownideas-laravel-backblaze)

PHPackages © 2026

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