Download the PHP package illuma-law/laravel-edge-clear without Composer

On this page you can find all versions of the php package illuma-law/laravel-edge-clear. 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 laravel-edge-clear

Laravel Edge Clear

Tests Packagist License Latest Stable Version

Standalone Cloudflare cache purging and cache bypass management for Laravel applications.

This package provides a fluent service, a Facade, and specialized middleware designed to help you manage your Cloudflare CDN cache directly from your Laravel application.

Features

Installation

You can install the package via composer:

You can publish the config file with:

Configuration

In your .env file, configure your Cloudflare credentials. You can use either an API Token (recommended) or an API Email + Key combo.

The published config/edge-clear.php config looks like this:

Usage & Integration

Triggering Purges

Use the CloudflarePurger facade to interact with the cache:

Real-world Example: Eloquent Observer

Invalidate your cache automatically when a model is saved or deleted:

Route Middleware

If you have specific routes that should never be cached by Cloudflare (like admin dashboards, carts, or user profiles), you can use the BypassEdgeCache middleware. It automatically appends headers (Cache-Control: no-store, no-cache...) that instruct Cloudflare to skip caching the response.

Set Cache Headers

Use the SetEdgeCacheHeaders middleware to manage your CDN headers fluently. It handles Cache-Control (including s-maxage) and Cache-Tag injection.

The middleware parameters are: ttl, tags (separated by ;), and profile (short or permanent).

Queued Purging (with Fallback)

For high-volume sites, you can use the PurgeEdgeCacheJob. It automatically detects if your Cloudflare plan supports Cache Tags and falls back to URL purging if needed.

Lifecycle Events

The package dispatches events that you can listen to for logging or updating your application state:

Error Handling

If Cloudflare rejects your request (e.g., bad token, invalid URLs), the package will throw a typed CloudflarePurgeException.

Testing

The package includes a comprehensive test suite using Pest.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-edge-clear with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0||^13.0
illuminate/http Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
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 illuma-law/laravel-edge-clear contains the following files

Loading the files please wait ...