PHPackages                             lukasz-adamski/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. lukasz-adamski/laravel-cloudflare

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

lukasz-adamski/laravel-cloudflare
=================================

Laravel framework Service Provider to automatic loading IP ranges of Cloudflare trust proxies.

81203PHP

Since Oct 6Pushed 7y agoCompare

[ Source](https://github.com/lukasz-adamski/laravel-cloudflare)[ Packagist](https://packagist.org/packages/lukasz-adamski/laravel-cloudflare)[ RSS](/packages/lukasz-adamski-laravel-cloudflare/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Cloudflare Trusted Proxy Service Provider for Laravel
=====================================================

[](#cloudflare-trusted-proxy-service-provider-for-laravel)

The package is developed to provide Cloudflare trust proxies support for Laravel Framework requests. List of IP ranges used by Cloudflare can be found here: ().

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

[](#installation)

1. Install composer package using command:

```
composer require lukasz-adamski/laravel-cloudflare

```

2. Add Service Provider in `config/app.php`:

```
Adams\Cloudflare\CloudflareServiceProvider::class,
```

3. Add middleware to your project in `app/Http/Kernel.php`. You can put this middleware where you want but if project is hosted with Cloudfare Reverse Proxy it is preferable to register it for all requests in `$middleware` variable.

```
\Adams\Cloudflare\Moddleware\TrustProxies::class,
```

4. Run artisan command to load fresh IPs from Cloudflare:

```
php artisan cloudflare:reload

```

Available commands
------------------

[](#available-commands)

This package will not load Cloudflare IPs automatically. To do this you can use two registered commands:

- `cloudflare:reload` - this command loads list of current Cloudflare Proxy IPs and store in application cache forever,
- `cloudflare:view` - this command show list of loaded IPs from Cloudflare.

Automatic reloading
-------------------

[](#automatic-reloading)

If you want automatic refreshing of Cloudflare IP ranges you can schedule `cloudflare:reload` command in your app. To do this open `app/Console/Kernel.php` and modify `schedule` function like this:

```
/**
 * Define the application's command schedule.
 *
 * @param \Illuminate\Console\Scheduling\Schedule $schedule
 * @return void
 */
protected function schedule(Schedule $schedule)
{
    $schedule->command('cloudflare:reload')
        ->daily();
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cb2502bf2583fb8d7598f8428da21a34802a6b4f729d375cba3d29da239a514?d=identicon)[lukasz-adamski](/maintainers/lukasz-adamski)

---

Top Contributors

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

---

Tags

cloudflarecloudflare-trust-proxieslaravel

### Embed Badge

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

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

###  Alternatives

[aw-studio/laravel-states

445.6k](/packages/aw-studio-laravel-states)[yzh52521/webman-task

 dynamic crontab task plugin for webman.

171.9k2](/packages/yzh52521-webman-task)

PHPackages © 2026

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