PHPackages                             sashalenz/cloudflare-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sashalenz/cloudflare-api

ActiveLibrary[API Development](/categories/api)

sashalenz/cloudflare-api
========================

Cloudflare API SDK for Laravel

0.1.0(1mo ago)0173↓50%MITPHPPHP ^8.2CI passing

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/sashalenz/cloudflare-api)[ Packagist](https://packagist.org/packages/sashalenz/cloudflare-api)[ Docs](https://github.com/sashalenz/cloudflare-api)[ RSS](/packages/sashalenz-cloudflare-api/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (1)Dependencies (11)Versions (2)Used By (0)

Cloudflare API Package
======================

[](#cloudflare-api-package)

Laravel package for interacting with Cloudflare API.

Installation
------------

[](#installation)

```
composer require sashalenz/cloudflare-api
```

The service provider is auto-discovered.

Configuration
-------------

[](#configuration)

Add your Cloudflare API token to your `.env` file:

```
CLOUDFLARE_API_TOKEN=your_api_token_here
```

Publish the config file:

```
php artisan vendor:publish --tag=cloudflare-api-config
```

Usage
-----

[](#usage)

### DNS Records

[](#dns-records)

#### List DNS Records

[](#list-dns-records)

```
use Sashalenz\CloudflareApi\CloudflareApi;

$records = CloudflareApi::dnsRecords()
    ->list('zone_id');
```

#### Get DNS Record Details

[](#get-dns-record-details)

```
$record = CloudflareApi::dnsRecords()
    ->details('zone_id', 'record_id');
```

#### Create DNS Record

[](#create-dns-record)

```
$record = CloudflareApi::dnsRecords()
    ->create('zone_id', [
        'type' => 'A',
        'name' => 'example.com',
        'content' => '192.0.2.1',
        'ttl' => 3600,
    ]);
```

#### Update DNS Record

[](#update-dns-record)

```
$record = CloudflareApi::dnsRecords()
    ->update('zone_id', 'record_id', [
        'content' => '192.0.2.2',
    ]);
```

#### Delete DNS Record

[](#delete-dns-record)

```
CloudflareApi::dnsRecords()
    ->delete('zone_id', 'record_id');
```

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13202688?v=4)[Oleksandr Petrovskyi](/maintainers/sashalenz)[@sashalenz](https://github.com/sashalenz)

---

Top Contributors

[![sashalenz](https://avatars.githubusercontent.com/u/13202688?v=4)](https://github.com/sashalenz "sashalenz (1 commits)")

---

Tags

laraveldnscloudflareCloudFlare APIsashalenz

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sashalenz-cloudflare-api/health.svg)

```
[![Health](https://phpackages.com/badges/sashalenz-cloudflare-api/health.svg)](https://phpackages.com/packages/sashalenz-cloudflare-api)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1613.3k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
