{"repo":"WendellAdriel/laravel-idempotency","free":true,"listed":false,"github":"https://github.com/WendellAdriel/laravel-idempotency","clone":"git clone https://github.com/WendellAdriel/laravel-idempotency.git","description":"HTTP Idempotency Middleware for Laravel applications","language":"PHP","stars":157,"topics":["api","http","http-requests","idempotency","laravel","laravel-package"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Idempotency HTTP idempotency middleware for Laravel applications Installation You can install the package via composer: You can publish the config file with: Usage Attach the middleware to routes that create or update data: By default, the middleware reads the key from the Idempotency-Key header or the idempotency key request input. This allows standard HTML forms to include the key in a hidden input. When both values are present, the header takes precedence. Use the @idempotency Blade directive to render the hidden input with a generated key: You may pass an existing key with @idempotency($key) . When the same key is sent again with the same request data, the package replays the original response instead of executing your route again. The HTTP middleware requires a cache driver that supports atomic locks. In multi-server deployments, every application server must use the same shared cache backend. The array driver is only suitable for tests or single-process development. See Laravel's atomic lock documentation for supported deployment options. Streamed and binary file responses cannot be captured safely, so they are not cached. A repeated request with the same key executes the route again, and the response does not include an Idempotency-Replayed header. Customize a single route with Idempotent::using : The cacheStatuses option controls which response categories are stored: informational , success , redirection , client error , and server error . All are enabled by d","default_branch":null,"files":null,"tree":[],"storefront":"/r/WendellAdriel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/WendellAdriel/laravel-idempotency/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}