New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

bluebeetle/idempotency-middleware

Idempotency middleware for your Laravel API.
8,227 3
Install
composer require bluebeetle/idempotency-middleware
Latest Version:v1.1.0
PHP:^8.4
Laravel:12 · 13
License:MIT
Last Updated:Oct 1, 2026
Links: GitHub  ·  Packagist
Maintainer: brunogaspar

Idempotency Middleware

Tests Code Analysis License

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

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

Full documentation is available at bluebeetle.pt/open-source/docs/idempotency-middleware.

Testing

composer test

Credits

License

Licensed under the MIT license.

Related Packages

eufaturo/idempotency-middleware

Idempotency middleware for your Laravel API.

1,040 0
shin1x1/laravel-force-https-url-scheme

Force https url schema middleware for Laravel 5

26,582 25
laravel-dev-common/union-middleware

Laravel dev middleware util

95 0
fsy-laravel/middleware-checklogin

Laravel dev mid_checklogin util

55 0

Version History

Version Released PHP Laravel License
v1.1.0 ^8.4 ^12.0|^13.0 MIT
v1.0.0 ^8.4 ^12.0|^13.0 MIT