Download the PHP package brewdigital/statamic-cloudflare-addon without Composer

On this page you can find all versions of the php package brewdigital/statamic-cloudflare-addon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package statamic-cloudflare-addon

Cloudflare Integration for Statamic

Cloudflare integration for Statamic with CLI, static caching integration, and control panel integration.

Inspired by HandmadeWeb/statamic-cloudflare

Requirements

Installation

You can install the package via composer:

Copy the package config to your local config with the publish command:

The configuration file will not be published automatically to avoid overwrites. You can publish the configuration file using the following command:

The configuration file can be modified from /cp/utilities/cloudflare/settings.

Usage

Update Settings: Purge collections per zone: Purge url per zone: Purge options:

CLI

You can purge everything via the following command:

Static Caching

If you want to use statamic-cloudflare as a static cache strategy, then you will need to manually register the cacher in the register method of your App\Providers\AppServiceProvider class:

Then update your static_cache config:

Then update the static_cache strategy at the top of the configuration to:

Currently, the Cloudflare integration is only used for purging. If you would like to use another caching strategy in combination with this caching strategy, then you are free to do that.

This can be done by updating the strategy section within the cloudflare strategy. Below is an example where we will be caching the application using the half measure:

In theory, you should be able to use any caching strategy here, such as the full measure or any other first or third-party strategies. statamic-cloudflare will simply pass requests to the defined strategy and will just hook into the purge actions to also purge the page in Cloudflare.

Control Panel

Events

statamic-cloudflare will listen to the Statamic\Events\EntrySaved, Statamic\Events\EntryDeleted, Statamic\Events\TermSaved, and Statamic\Events\TermDeleted events and will trigger a purge for the URL. These events will be ignored if you have configured the static cache to be a strategy that uses the cloudflare driver, as the driver will instead handle the needed purging actions.

Utility

statamic-cloudflare will add a utility and a nav item to your Statamic CP.

Route: /cp/utilities/cloudflare/settings

This will be available to Super Users and the Cloudflare Manager and Manage Brew Cloudflare Settings are available to be assigned to any role.

You can purge everything quickly by navigating through the purging tabs.

By following these instructions and updating your composer.json, you ensure that the Cloudflare addon's configuration file is automatically published after installation or updates.


All versions of statamic-cloudflare-addon with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
statamic/cms Version ^5.0
cloudflare/sdk Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brewdigital/statamic-cloudflare-addon contains the following files

Loading the files please wait ....