Download the PHP package platformcommunity/flysystem-bunnycdn without Composer
On this page you can find all versions of the php package platformcommunity/flysystem-bunnycdn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download platformcommunity/flysystem-bunnycdn
More information about platformcommunity/flysystem-bunnycdn
Files in platformcommunity/flysystem-bunnycdn
Package flysystem-bunnycdn
Short Description Flysystem adapter for BunnyCDN
License MIT
Informations about the package flysystem-bunnycdn
Flysystem Adapter for BunnyCDN Storage
Installation
To install flysystem-bunnycdn
, require the package with no version constraint. This should match the flysystem-bunnycdn
version with your version of FlySystem (v2, v3 etc).
Usage
Usage with Pull Zones
To have BunnyCDN adapter publish to a public CDN location, you have to a "Pull Zone" connected to your BunnyCDN Storage Zone. Add the full URL prefix of your Pull Zone (including http://
/https://
) to the BunnyCDNAdapter parameter like shown below.
Note: You can also use your own domain name if it's configured in the pull zone.
Once you add your pull zone, you can use the ->getUrl($path)
, or in Laravel, the ->url($path)
command to get the fully qualified public URL of your BunnyCDN assets.
Usage in Laravel 9
To add BunnyCDN adapter as a custom storage adapter in Laravel 9, install using the v3
composer installer.
Next, install the adapter to your AppServiceProvider
to give Laravel's FileSystem knowledge of the BunnyCDN adapter.
Finally, add the bunnycdn
driver into your config/filesystems.php
configuration file.
Lastly, populate your BUNNYCDN_STORAGE_ZONE
, BUNNYCDN_API_KEY
BUNNYCDN_REGION
variables in your .env
file.
After that, you can use the bunnycdn
disk in Laravel 9.
Note: You may have to run php artisan config:clear
in order for your configuration to be refreshed if your app is running with a config cache driver / production mode.
Regions
For a full region list, please visit the BunnyCDN API documentation page.
flysystem-bunnycdn
also comes with constants for each region located within PlatformCommunity\Flysystem\BunnyCDN\BunnyCDNRegion
.
List of Regions
Contributing
Pull requests welcome. Please feel free to lodge any issues as discussion points.
Development
Most of the understanding of how the Flysystem Adapter for BunnyCDN works comes from tests/
. If you want to complete tests against a live BunnyCDN endpoint, copy the tests/ClientDI_Example.php
to tests/ClientDI.php
and insert your credentials into there. You can then run the whole suite by running vendor/bin/phpunit
, or against a specific file by running vendor/bin/phpunit --bootstrap tests/ClientDI.php tests/ClientTest.php
.
Licence
The Flysystem adapter for Bunny.net is licensed under MIT.
All versions of flysystem-bunnycdn with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.4
league/mime-type-detection Version ^1.11