WendellAdriel

HTTP Idempotency Middleware for Laravel applications

19
3
100% credibility
Found Apr 22, 2026 at 19 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
PHP
AI Summary

A tool for web apps that ensures repeating requests with the same unique code don't create duplicates by replaying stored results.

How It Works

1
🔍 Discover the safety tool

While building a website for orders or payments, you find a helpful tool that prevents duplicate actions if requests retry due to network glitches.

2
📦 Bring it into your project

You easily add the tool to your website project with a quick step.

3
⚙️ Choose your settings

Decide how long to remember past actions and whether to track them per person, per device location, or for everyone.

4
🛡️ Protect key actions

You mark the important spots on your site, like checkout or updates, so they stay safe from duplicates.

5
🔑 Users add a unique code

When people submit forms to create or change things, they include a special unique code with their request.

6
♻️ Handle retries smoothly

If the same code and details come again, your site instantly replays the first result without repeating the work—perfect for spotty connections.

7
🧹 Manage stored memories

You can peek at or clear out old records of past actions whenever you need to keep things tidy.

🎉 Flawless reliable site

Your website now confidently handles retries, keeping everything accurate and duplicate-free for happy users.

Sign up to see the full architecture

6 more

Sign Up Free

Star Growth

See how this repo grew from 19 to 19 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is laravel-idempotency?

This PHP package brings HTTP idempotency to Laravel apps via middleware, letting clients send an idempotency key header on POST, PUT, or PATCH requests. It caches the first response and replays it on retries with matching keys and payloads, preventing duplicate writes like double-charging. Use a cache driver with atomic locks, and it handles scopes like user, IP, or global for segmentation.

Why is it gaining traction?

Easy apply via route middleware, controller attributes, or aliases, with overrides for TTL, required keys, and custom headers. It rejects payload changes with 422 Unprocessable Entity, blocks in-flight duplicates with 409 Conflict and Retry-After, plus Artisan commands like idempotency:list and idempotency:forget for inspection. Beats manual checks or alternatives like infinitypaul idempotency laravel by tying into Laravel's cache and Boost AI skills.

Who should use this?

Laravel backend devs building APIs for orders, payments, or webhooks where network flakes cause retry duplicates. API teams handling idempotency HTTP verbs on mutable endpoints, especially with mobile or distributed clients. Suited for e-commerce or fintech backends needing safe HTTP POST idempotency without controller changes.

Verdict

Grab it for Laravel if idempotency headers are on your roadmap—docs are thorough, tests pass, and CLI tools shine. With just 19 stars and 1.0% credibility, it's immature; prototype in non-prod first and monitor for edge cases.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.