Download the PHP package secretwebmaster/laravel-cloudflare without Composer
On this page you can find all versions of the php package secretwebmaster/laravel-cloudflare. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download secretwebmaster/laravel-cloudflare
More information about secretwebmaster/laravel-cloudflare
Files in secretwebmaster/laravel-cloudflare
Package laravel-cloudflare
Short Description Modern PHP 8+ package for seamless Cloudflare API integration in Laravel applications. Manage zones, DNS records, firewall rules, and more.
License MIT
Informations about the package laravel-cloudflare
Laravel Cloudflare
A modern PHP 8+ package for seamless Cloudflare API integration in Laravel applications. Manage zones, DNS records, firewall rules, analytics, and more with a clean, type-safe interface.
Features
- Modern PHP 8+ - Strict type hints, typed properties, and modern syntax
- Comprehensive Coverage - Zones, DNS, Firewall, Settings, and more
- Well Documented - Extensive PHPDoc blocks with parameter tables
- Type Safe - Full type safety with strict typing throughout
- Laravel Integration - Built specifically for Laravel using HTTP facade
- Easy to Use - Intuitive API with consistent method naming
- Free Tier Friendly - All free tier functions fully supported
- Auto-Discovery - Automatic service provider registration
Requirements
- PHP 8.0 or higher
- Laravel 8.0 or higher
- Cloudflare API Token or API Key
Installation
Install the package via Composer:
Configuration
Publish the configuration file:
Add your Cloudflare credentials to your .env file:
Basic Usage
Initialize the Client
Working with Zones
The Zones model provides complete zone management functionality.
List All Zones
Get Zone by Domain
Get Zone ID by Domain
Create a New Zone
Get Zone Details
Update Zone Settings
Purge Cache
Check Zone Activation
Delete Zone
Working with DNS Records
The DnsRecords model handles all DNS record operations.
List DNS Records
Create DNS Record
Get DNS Record Details
Update DNS Record (Full Update)
Patch DNS Record (Partial Update)
Delete DNS Record
Advanced Usage
Zone Settings
Manage all zone settings with dedicated getter and setter methods.
Firewall Access Rules
Manage IP access rules at zone, account, or user level.
Page Rules
Create and manage page rules for URL-specific behaviors.
Accounts & Users
Available Models
All models are accessible through the client:
| Model | Description | Methods |
|---|---|---|
Zones |
Zone management | list, create, get, edit, delete, purgeCache, etc. |
DnsRecords |
DNS record management | list, create, get, update, patch, delete, import, export |
ZoneSettings |
Zone settings (86 methods) | getSsl, updateSsl, getMinify, updateMinify, etc. |
FirewallAccessRules |
IP access rules | User/Account/Zone level CRUD operations |
FirewallLockdowns |
Zone lockdown rules | list, create, get, update, delete |
FirewallUARules |
User Agent blocking | list, create, get, update, delete |
Waf |
Web Application Firewall | Overrides, Packages, Groups, Rules management |
PageRules |
Page rules | list, create, get, update, delete |
Accounts |
Account management | list, get, details, update |
Users |
User management | get, details, update |
Error Handling
All methods return the Cloudflare API response. Check the success field:
Testing
Changelog
Please see CHANGELOG for recent changes.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Security
If you discover any security-related issues, please email the package maintainer instead of using the issue tracker.
Credits
- Author: SecretWebmaster
- Built with ❤️ for the Laravel community
License
The MIT License (MIT). Please see License File for more information.
Resources
Support
- Issues: GitHub Issues
- Documentation: This README and inline PHPDoc blocks
- Cloudflare API: Official API Docs