platformcommunity/flysystem-bunnycdn
Laravel Flysystem adapter for BunnyCDN Storage. Use BunnyCDN as a filesystem disk for uploads and file management, with support for common Flysystem operations like read/write, delete, directories, and URL generation for serving assets via BunnyCDN.
config/filesystems.php), aligning with the framework’s design principles. Ideal for apps already using Flysystem (e.g., Storage facade, filesystem helper).InteractsWithMedia, HasMedia traits) and third-party packages like spatie/laravel-medialibrary.Storage::disk('bunny')->put()), reducing refactoring.visibility/timestamp).config/services.php)?HandleUploadJob).asset('cdn://path/to/file')).Storage::disk('local') calls, direct SDK usage).config/filesystems.php:
'disks' => [
'bunny' => [
'driver' => 'bunnycdn',
'key' => env('BUNNYCDN_KEY'),
'secret' => env('BUNNYCDN_SECRET'),
'endpoint' => env('BUNNYCDN_ENDPOINT'),
'bucket' => env('BUNNYCDN_BUCKET'),
'url' => env('BUNNYCDN_URL'),
'options' => [
'visibility' => 'public', // or 'private'
],
],
],
.env or Vault).Storage::disk('bunny')->put()).Storage::extend() for custom logic if needed.composer.json for version constraints).composer require platformcommunity/flysystem-bunnycdn.Storage facade.visibility settings for private/public assets.Cache-Control via Flysystem options).config:cache to avoid runtime credential leaks.Storage::extend('bunny', function ($app) {
return new BunnyCdnAdapter($app['config']['filesystems.disks.bunny'], $app['log']);
});
chunk() for batch operations.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| BunnyCDN outage (regional/global) | Storage/CDN unavailability | Fallback to local storage or multi-region BunnyCDN zones. |
| Credential leakage | Security breach | Use Laravel’s env() + Vault; rotate keys via `bunny |
How can I help you explore Laravel packages today?