Download the PHP package phattarachai/laravel-cloudflare without Composer

On this page you can find all versions of the php package phattarachai/laravel-cloudflare. 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-cloudflare

Laravel Cloudflare

Latest Version on Packagist Tests Code Style PHP Version Laravel Version Total Downloads

Purge the Cloudflare edge cache, toggle Development Mode, and register tunnel DNS records from artisan. Built for a fleet of apps sharing one Cloudflare zone behind a cloudflared tunnel, where purge_everything and Enterprise-only hosts/prefixes purges are both wrong.

Install

Set the zone id (a public identifier, safe to commit) and, if you register DNS, the tunnel id:

The API token is resolved at runtime and falls back to the process env, so on a self-hosted runner you inject CLOUDFLARE_API_TOKEN once (in the runner's .env) and no repo needs a secret. A Zone → Cache Purge scope covers purge and dev-mode; add Zone → DNS Edit to use cloudflare:dns, and Zone → Zone WAF Edit to use cloudflare:waf.

Purge

Purges by exact files derived from public/build/manifest.json. Make it the last deploy step:

When there is no token or no manifest it exits 0 without calling the API, so dev, tests, and a not-yet-configured repo keep CI green.

Development Mode

DNS

Upsert-only — it never deletes a record it did not declare, so it is safe against the shared zone.

Declare an app's own records in config/cloudflare.php and a bare php artisan cloudflare:dns upserts them — handy as a one-off when spinning up a new subdomain:

WAF custom rules

Upsert-only, keyed by a tag embedded in each rule's description — it never touches a rule it did not declare, so it is safe against the shared zone. The canonical use is a Managed Challenge on /admin: bots and brute-force hit the edge challenge, real browsers pass near-invisibly, and the API is left alone (a challenge needs a browser + cf_clearance cookie, so it would break XHR, mobile, and webhooks). Needs a Zone → Zone WAF Edit token.

Declare the rules in config/cloudflare.php. Each carries a unique tag, an action (default managed_challenge), and EITHER declarative paths (the command builds the expression and, absent hosts, scopes it to this app's own host) OR a raw expression for full control:

Verify: a challenged request returns 403 with a cf-mitigated: challenge header (curl always lands here — it can't solve the JS challenge); a passed request has no cf-mitigated header and holds a cf_clearance cookie (HttpOnly — visible in DevTools → Application → Cookies).

Testing


All versions of laravel-cloudflare with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/console 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 phattarachai/laravel-cloudflare contains the following files

Loading the files please wait ...