PHPackages                             bluebeetle/idempotency-middleware - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. bluebeetle/idempotency-middleware

ActiveLibrary[HTTP &amp; Networking](/categories/http)

bluebeetle/idempotency-middleware
=================================

Idempotency middleware for your Laravel API.

v1.1.0(3w ago)31.1k↓42%1MITPHPPHP ^8.4CI passing

Since May 2Pushed 3w ago2 watchersCompare

[ Source](https://github.com/bluebeetlept/idempotency-middleware)[ Packagist](https://packagist.org/packages/bluebeetle/idempotency-middleware)[ RSS](/packages/bluebeetle-idempotency-middleware/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (20)Versions (3)Used By (1)

Idempotency Middleware
======================

[](#idempotency-middleware)

[![Tests](https://github.com/bluebeetlept/idempotency-middleware/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/bluebeetlept/idempotency-middleware/actions?query=workflow%3Atests)[![Code Analysis](https://github.com/bluebeetlept/idempotency-middleware/actions/workflows/code-analysis.yml/badge.svg?branch=main)](https://github.com/bluebeetlept/idempotency-middleware/actions?query=workflow%3Acode-analysis)[![License](https://camo.githubusercontent.com/e892d3e350d1c97e8d3935cf91328e4b8348bb0e498b32b599e5dd384f2ceee0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626c7565626565746c6570742f6964656d706f74656e63792d6d6964646c65776172653f6c6162656c3d4c6963656e7365)](https://opensource.org/licenses/MIT)

Simple and fully tested Laravel middleware for implementing idempotency in your API requests.

Quick Start
-----------

[](#quick-start)

```
composer require bluebeetle/idempotency-middleware
```

Add the middleware to your routes:

```
use BlueBeetle\IdempotencyMiddleware\Idempotency;

Route::middleware([Idempotency::class])->group(function () {
    Route::post('/orders', [OrderController::class, 'store']);
});
```

Send requests with an `Idempotency-Key` header (UUID v4):

```
POST /api/orders HTTP/1.1
Idempotency-Key: 6b3fd36c-24c6-4eb2-a764-bb6c91b33e56
Content-Type: application/json

{"product_id": 1, "quantity": 2}

```

Repeated requests with the same key return the cached response instead of processing again.

Documentation
-------------

[](#documentation)

Full documentation is available at [bluebeetle.pt/open-source/docs/idempotency-middleware](https://bluebeetle.pt/open-source/docs/idempotency-middleware).

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Blue Beetle](https://bluebeetle.pt)
- [All Contributors](../../contributors)

License
-------

[](#license)

Licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance95

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.5% 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 ~60 days

Total

2

Last Release

22d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8f0c0b617b2b745b57819576f7e38e21e6aa6cb47e63ebf78cbe905fae392a3?d=identicon)[brunogaspar](/maintainers/brunogaspar)

---

Top Contributors

[![brunogaspar](https://avatars.githubusercontent.com/u/2285372?v=4)](https://github.com/brunogaspar "brunogaspar (22 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (5 commits)")

---

Tags

middlewarelaravelidempotency

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bluebeetle-idempotency-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/bluebeetle-idempotency-middleware/health.svg)](https://phpackages.com/packages/bluebeetle-idempotency-middleware)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M321](/packages/laravel-horizon)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k30.2M151](/packages/laravel-cashier)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)

PHPackages © 2026

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