PHPackages                             jcergolj/brevo-webhook-manager-for-laravel - 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. jcergolj/brevo-webhook-manager-for-laravel

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

jcergolj/brevo-webhook-manager-for-laravel
==========================================

Brevo webhook manager for Laravel

v1.4(2mo ago)207.7k↑206.3%MITPHP

Since Nov 7Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/jcergolj/brevo-webhook-manager-for-laravel)[ Packagist](https://packagist.org/packages/jcergolj/brevo-webhook-manager-for-laravel)[ RSS](/packages/jcergolj-brevo-webhook-manager-for-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (21)Versions (6)Used By (0)

Brevo Webhook Manager CLI Tool for Laravel
==========================================

[](#brevo-webhook-manager-cli-tool-for-laravel)

This CLI tool provides a convenient way to manage Brevo webhooks from the command line. It provides a number of commands for fetching, creating, updating, and deleting webhooks.

[![create brevo webhook example](imgs/create-webhook.png)](imgs/create-webhook.png)

Features:

- Fetch webhooks from the Brevo API
- Create new webhooks
- Update existing webhooks
- Delete webhooks

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

[](#installation)

### Requirements

[](#requirements)

Required PHP &gt;=8.2

### Installing package

[](#installing-package)

```
composer require jcergolj/brevo-webhook-manager-for-laravel
```

### Publishing config file

[](#publishing-config-file)

```
php artisan vendor:publish --provider="Jcergolj\BrevoWebhookManager\BrevoWebhookMangerServiceProvider"
```

### .env file

[](#env-file)

```
BREVO_API_KEY=
USER_AGENT=""
BREVO_BASE_URL=https://api.brevo.com/v3/

# Optional — override the default Brevo IP ranges (comma-separated CIDRs)
BREVO_VALID_CIDRS=1.179.112.0/20,172.246.240.0/20

# Optional — allow requests coming through Cloudflare edge IPs
BREVO_ALLOW_CLOUDFLARE=false

# Required when using VerifyBrevoWebhookBasicAuthMiddleware
BREVO_WEBHOOK_USERNAME=
BREVO_WEBHOOK_PASSWORD=

# Required when using VerifyBrevoWebhookTokenMiddleware
BREVO_WEBHOOK_TOKEN=
# Optional — header name carrying the token (default: Authorization)
BREVO_WEBHOOK_TOKEN_HEADER=Authorization
```

Securing incoming webhooks
--------------------------

[](#securing-incoming-webhooks)

Two middlewares are shipped. Register them on your webhook route.

### 1. IP allow-list — `VerifyBrevoWebhookMiddleware`

[](#1-ip-allow-list--verifybrevowebhookmiddleware)

Rejects any request whose source IP is outside the configured CIDRs. Defaults to Brevo's published ranges. Set `BREVO_ALLOW_CLOUDFLARE=true` if your webhook route sits behind Cloudflare so edge IPs are accepted too. Override the base list via `BREVO_VALID_CIDRS`.

### 2. Basic auth — `VerifyBrevoWebhookBasicAuthMiddleware`

[](#2-basic-auth--verifybrevowebhookbasicauthmiddleware)

Implements [Brevo username/password authentication](https://developers.brevo.com/docs/username-and-password-authentication). When creating the webhook on Brevo, embed credentials in the URL:

```
https://USERNAME:PASSWORD@your-app.test/brevo/webhook

```

Set the same values in `.env` as `BREVO_WEBHOOK_USERNAME` and `BREVO_WEBHOOK_PASSWORD`. The middleware compares with `hash_equals` and aborts `401` on mismatch. If either env var is missing, the middleware aborts `500` (fail-closed).

### 3. Token auth — `VerifyBrevoWebhookTokenMiddleware`

[](#3-token-auth--verifybrevowebhooktokenmiddleware)

Verifies a shared secret token sent in a request header. Defaults to reading `Authorization: Bearer `. Configure a different header via `BREVO_WEBHOOK_TOKEN_HEADER` (e.g. `X-Brevo-Token`). When using a custom header, the raw header value is compared directly (no `Bearer` prefix). Set `BREVO_WEBHOOK_TOKEN` to the shared secret. Aborts `401` on mismatch, `500` if unconfigured.

### 4. See the Brevo docs

[](#4-see-the-brevo-docs)

### Route example

[](#route-example)

```
use Jcergolj\BrevoWebhookManager\Http\Middleware\VerifyBrevoWebhookBasicAuthMiddleware;
use Jcergolj\BrevoWebhookManager\Http\Middleware\VerifyBrevoWebhookMiddleware;
use Jcergolj\BrevoWebhookManager\Http\Middleware\VerifyBrevoWebhookTokenMiddleware;

Route::post('/brevo/webhook', BrevoWebhookController::class)
    ->middleware([
        VerifyBrevoWebhookMiddleware::class,
        VerifyBrevoWebhookBasicAuthMiddleware::class, // or VerifyBrevoWebhookTokenMiddleware::class
    ]);
```

### Avaliable commands

[](#avaliable-commands)

```
php artisan brevo-webhooks:create-inbound
```

```
php artisan brevo-webhooks:create-marketing
```

```
php artisan brevo-webhooks:create-transactional
```

```
php artisan brevo-webhooks:update
```

```
php artisan brevo-webhooks:delete
```

```
php artisan brevo-webhooks:fetch
```

```
php artisan brevo-webhooks:fetch-all
```

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance86

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Every ~224 days

Total

5

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/111d8d25ce610ce3d6cb7413529089ce6482e34dfc5a6a8bf04592719a0abe07?d=identicon)[jcergolj](/maintainers/jcergolj)

---

Top Contributors

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

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jcergolj-brevo-webhook-manager-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/jcergolj-brevo-webhook-manager-for-laravel/health.svg)](https://phpackages.com/packages/jcergolj-brevo-webhook-manager-for-laravel)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k95](/packages/nativephp-mobile)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)

PHPackages © 2026

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