Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Cloudflare Laravel Package

sumanion/laravel-cloudflare

A Laravel integration for the Cloudflare API that lets you manage zones, DNS records, and cache purging directly from your application. Configure credentials once and use a clean, fluent interface to automate common Cloudflare operations.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Content freshness SLA and cache strategy. Programmatic cache purging (by URL, by cache tag, or whole zone) is what lets you promise "publish = live in seconds" or give editors a "force refresh" action. The PM decision is which freshness guarantee you make, and whether that requires tag-based purging (a paid Cloudflare capability) versus URL-only purges.
  • Custom domains and white-labeling. DNS record create/update/delete via the API underpins self-serve custom-domain provisioning, per-tenant subdomains, vanity URLs, and branded email domains. The product decision is whether to offer these at all, and what the onboarding flow looks like when DNS is automated rather than a support ticket.
  • Self-serve and support tooling. Zone-settings and resource access mean support or ops can flip a setting (developer mode, security level, SSL mode) from an internal console instead of the Cloudflare dashboard — enabling "support can fix customer config without escalation" as a product capability.
  • Deploy and environment automation. Purge-on-deploy and DNS automation for ephemeral/staging environments reduce operational toil. This supports deciding how much of the release pipeline is automated versus manual.
  • Build vs. buy vs. glue. Cloudflare publishes an official PHP SDK; this package is a thin Laravel-native wrapper (config, service provider, facade). The real decision is: wrapper, official SDK, or a handful of in-house HTTP calls. Scope here is narrow — zones, DNS, cache — so the choice is mostly about ergonomics and maintenance, not capability.

When to Consider This Package

Consider it when:

  • You are on Laravel + Cloudflare and need to drive Cloudflare from application code — purge caches on content publish, manage DNS for custom domains, read/update zone settings — not just consume edge headers.
  • You want Laravel-native ergonomics: a config file, auto-discovered service provider, facade (Cloudflare::...), credentials in .env, no hand-rolled Guzzle clients.
  • Your needs fall inside its narrow scope (zones, DNS records, cache purging) and you can validate it against a few concrete workflows.
  • You are willing to treat it as unvetted code: 0 stars, 0 dependents means pin the version, read the source, and be ready to fork or vendor it.

Look elsewhere when:

  • You need broader Cloudflare surface — Workers, R2, Images, WAF custom rules, analytics, Turnstile, Email Routing. Use the official cloudflare/sdk or the raw API.
  • You need support, SLA, release cadence, or a security disclosure path — go with the official SDK.
  • You need multi-CDN abstraction or portability across providers.
  • It's a one-off purge — a deploy hook or the dashboard is simpler than adding a dependency.
  • You rely on tag-based cache purging — confirm your Cloudflare plan supports cache tags (largely Enterprise); otherwise design around URL/zone purges.
  • Your actual need is real client IP / country resolution — that's a different problem (Laravel TrustProxies plus Cloudflare headers), not what this package does.

How to Pitch It (Stakeholders)

For executives: This is a small utility that lets our Laravel app talk to Cloudflare's API, so we can automatically clear caches when content changes, provision DNS for customer domains, and adjust zone settings without someone logging into the dashboard. It removes manual toil and unlocks features we'd otherwise need ops work for — "publishing is instantly live" and self-serve custom domains being the two most tangible. It is glue, not a platform: Cloudflare already ships an official SDK, this wrapper has no meaningful adoption, and the capability is thin. Scope it to specific, reversible workflows.

Recommendation: adopt behind narrow use cases — (1) cache purge on content publish and (2) DNS automation for custom domains — and prove value before broadening. Prefer the official Cloudflare SDK if we need more than these three resource types or want a maintained dependency; treat this package as an accelerator, not a foundation. Use scoped Cloudflare API tokens with least privilege (never global keys), confirm plan support for cache tags, and abstract the calls behind our own service interface so swapping to the SDK or in-house code is a one-file change. Budget roughly 1–3 engineering days per workflow.

For engineering: it's a config + service provider + facade over the Cloudflare API. Wrap it behind an internal service so the vendor is an implementation detail, add tests with mocked HTTP responses, and keep tokens in secret storage with the minimum scopes. Verify behavior and edge cases (plan-gated cache tags, DNS record conflicts, zone permissions) against real Cloudflare before relying on it in any user-facing flow.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels