{"id":29282254,"url":"https://github.com/javidalpe/laravel-idempotency","last_synced_at":"2025-07-05T17:18:38.000Z","repository":{"id":56997004,"uuid":"122668855","full_name":"javidalpe/laravel-idempotency","owner":"javidalpe","description":"Laravel Idempotency Middleware","archived":false,"fork":false,"pushed_at":"2020-07-01T03:45:07.000Z","size":8,"stargazers_count":26,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T16:03:24.771Z","etag":null,"topics":["api","cache","idempotency","idempotent","laravel","middleware","rest"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javidalpe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-23T20:23:21.000Z","updated_at":"2025-02-14T09:34:37.000Z","dependencies_parsed_at":"2022-08-21T11:10:15.551Z","dependency_job_id":null,"html_url":"https://github.com/javidalpe/laravel-idempotency","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/javidalpe/laravel-idempotency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-idempotency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-idempotency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-idempotency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-idempotency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javidalpe","download_url":"https://codeload.github.com/javidalpe/laravel-idempotency/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-idempotency/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263173400,"owners_count":23425127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cache","idempotency","idempotent","laravel","middleware","rest"],"created_at":"2025-07-05T17:18:37.381Z","updated_at":"2025-07-05T17:18:37.994Z","avatar_url":"https://github.com/javidalpe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Idempotent Requests\n\nFirst, what is Idempotency and why I need it?\n\nCheckout this awesome [post from Brandum Leach](https://stripe.com/blog/idempotency).\n\n### Install\n\nRequire this package with composer using the following command:\n\n```bash\ncomposer require javidalpe/laravel-idempotency \n```\n\n### Usage\n\nRegister Idempotency middleware on your http kernel file:\n\n```php\n'api' =\u003e [\n    'throttle:60,1',\n    'bindings',\n    \\Javidalpe\\Idempotency\\Idempotency::class,\n], \n```\n\nTo perform an idempotent request, provide an additional `Idempotency-Key: \u003ckey\u003e` header to the request.\n\n### How it works\n\nIf the header `Idempotency-Key` is present on the request and the request method is different from GET, PUT and DELETE, the middleware stores the response on the cache. Next time you make a request with same idempotency key, the middleware will return the cached response.\n\nHow you create unique keys is up to you, but I suggest using V4 UUIDs or another appropriately random string. It'll always send back the same response for requests made with the same key, and keys can't be reused with different request parameters. Keys expire after 24 hours.  \n\n### License\n\nThe Laravel Idempotency is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavidalpe%2Flaravel-idempotency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavidalpe%2Flaravel-idempotency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavidalpe%2Flaravel-idempotency/lists"}