PHPackages                             broken-titan/laravel-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. broken-titan/laravel-idempotency-middleware

ActiveLibrary

broken-titan/laravel-idempotency-middleware
===========================================

Idempotency middleware for Laravel.

v1.1.1(2y ago)05.7k2MITPHPPHP &gt;=7.4

Since Jul 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/broken-titan/laravel-idempotency-middleware)[ Packagist](https://packagist.org/packages/broken-titan/laravel-idempotency-middleware)[ RSS](/packages/broken-titan-laravel-idempotency-middleware/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Laravel Idempotent Middleware
=============================

[](#laravel-idempotent-middleware)

This package makes it easy to add an indempotentcy to Laravel requests.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

Install this package with Composer:

```
composer require broken-titan/laravel-idempotency-middleware

```

Configuration
-------------

[](#configuration)

There are three configuration values in use which all have defaults. They can be overwritten in config/idempotency.php.

- idempotency.expiration (default: 1440)
- idempotency.header (default: "Idempotency-Key")
- idempotency.methods (default: \["POST"\])

You can also pass route-specific parameters in the routes file when setting the middleware.

Usage
-----

[](#usage)

For ease of use, it is recommended that you add the middleware in your App\\Http\\Kernel.php file to $routeMiddleware.

```
    'idempotency' => \BrokenTitan\Idempotency\Middleware\Idempotency::class

```

You can set middleware for routes using the standard middleware assignment function.

```
    Route::apiResource("model", "ModelController", )->middleware("idempotency");

```

The idempotency middle parameters can be set on a per-route basis, overriding the configuration default.

```
    Route::apiResource("model", "ModelController", )->middleware("idempotency:X-Custom-Header,POST,100");

```

Testing
-------

[](#testing)

A Docker compose file is included that allows you to run tests for this package.

Security
--------

[](#security)

If you discover any security issues that would affect existing users, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Feel free to contribute to the package.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](license.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

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

Recently: every ~109 days

Total

6

Last Release

951d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0349b2c67312de7cd10ed2a5f75a49cce795055f9f6697860c6f8335362425c1?d=identicon)[TheThird](/maintainers/TheThird)

---

Top Contributors

[![th3third](https://avatars.githubusercontent.com/u/7121736?v=4)](https://github.com/th3third "th3third (6 commits)")[![GodfreysDragon](https://avatars.githubusercontent.com/u/8823630?v=4)](https://github.com/GodfreysDragon "GodfreysDragon (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/broken-titan-laravel-idempotency-middleware/health.svg)

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

PHPackages © 2026

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