Download the PHP package boone-studios/laravel-idempotency without Composer
On this page you can find all versions of the php package boone-studios/laravel-idempotency. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download boone-studios/laravel-idempotency
More information about boone-studios/laravel-idempotency
Files in boone-studios/laravel-idempotency
Package laravel-idempotency
Short Description Stripe-style Idempotency-Key middleware for multi-tenant Laravel APIs.
License MIT
Informations about the package laravel-idempotency
boone-studios/laravel-idempotency
Stripe-style Idempotency-Key middleware for multi-tenant Laravel APIs.
- Requires an idempotency header on mutating requests
- Cache-locks concurrent retries
- Replays the stored response on matching payload
- Returns
409 Conflictwhen the same key is reused with a different body - Prunes expired records via Eloquent's
Prunable
Requirements
- PHP 8.2+
- Laravel 12 or 13
Installation
Configuration
scope_resolver must be configured before you use this middleware. There is
no default implementation — the package ships as null and will throw a
RuntimeException at request time (with a message pointing back to this
config key) if you register the idempotency middleware on a route without
setting it first.
Implement BooneStudios\Idempotency\Contracts\ResolvesIdempotencyScope and set it in config/idempotency.php:
Register the middleware:
Only apply the idempotency middleware to routes where a scope/tenant is
always resolvable (e.g. authenticated, tenant-scoped endpoints). Routes that
legitimately have no tenant yet (e.g. a signup endpoint) should not use this
middleware — resolution failure is treated as a configuration error, not a
"no tenant" case.
License
MIT © Boone Studios, LLC
All versions of laravel-idempotency with dependencies
illuminate/cache Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0