PHPackages                             qbcloud/laravel-cloudflare - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. qbcloud/laravel-cloudflare

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

qbcloud/laravel-cloudflare
==========================

A Laravel extension package for managing Cloudflare websites and domain names.

1.0.0(1y ago)010MITPHPPHP &gt;=7.2.5

Since Jul 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/YQB520/qbcloud-laravel-cloudflare)[ Packagist](https://packagist.org/packages/qbcloud/laravel-cloudflare)[ RSS](/packages/qbcloud-laravel-cloudflare/feed)WikiDiscussions master Synced 1mo ago

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

主要用途
----

[](#主要用途)

使用Laravel 6.x 以上在Cloudflare上批量创建站点、批量删除站点、批量添加DNS记录、快速删除所有DNS记录、修改SSL类型、清除站点所有缓存内容。

用法
--

[](#用法)

```
composer require qbcloud/laravel-cloudflare
```

发布配置文件：

```
php artisan vendor:publish --provider="QbCloud\Cloudflare\Providers\CloudflareServiceProvider"
```

```
// config/cloudflare.php

return [
    'email' => 'xxx@gmail.com', // Cloudflare Username
    'global_key' => 'globalxxoo', // Cloudflare Global API Key
    'account_id' => 'bbxxkk', // Cloudflare Account ID
    'ip_address' => null // 默认记录值  用于添加DNS记录
];
```

```
use QbCloud\Cloudflare\Facades\Cloudflare;

// 批量创建站点
Cloudflare::createZones(['xxx.com','xxx.net']);

// 批量删除站点
Cloudflare::deleteZones(['xxx.com','xxx.net']);

// 清除站点所有缓存内容
Cloudflare::purgeAllCache('xxx.com');

// 批量添加DNS记录
Cloudflare::createRecords('xxx.com', ['@', 'www', 'test'], '127.0.0.1', 'A');

// 删除一条DNS记录
Cloudflare::deleteRecords('xxx.com', 'test');

// 删除所有DNS记录
Cloudflare::deleteAllRecords('xxx.com');

// 修改SSL类型
Cloudflare::updateSSLSetting('xxx.com', 'full');

// 或者
use QbCloud\Cloudflare\Cloudflare;

$cloudflare = new Cloudflare();
$cloudflare->createZones(['xxx.com','xxx.net']);
```

### 官方文档

[](#官方文档)

[Cloudflare API](https://developers.cloudflare.com/api/operations/zones-get)
[Cloudflare SDK](https://github.com/cloudflare/cloudflare-php)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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

678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/702bf8a1771a16794a7ddb8d493b161e79a92fa99fe432950a2b7246c7775cd4?d=identicon)[YQB520](/maintainers/YQB520)

---

Top Contributors

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

---

Tags

laraveldnswebsitecloudflaredomain

### Embed Badge

![Health badge](/badges/qbcloud-laravel-cloudflare/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M684](/packages/barryvdh-laravel-ide-helper)[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3372.7M4](/packages/monicahq-laravel-cloudflare)[orrison/cumulus

Import DNS records from Laravel Vapor into Cloudflare

3817.1k](/packages/orrison-cumulus)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[astrotomic/laravel-dns

327.4k](/packages/astrotomic-laravel-dns)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)

PHPackages © 2026

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