Idempotency middleware for Laravel.
broken-titan/laravel-idempotency-middleware is a Laravel package for idempotency middleware for laravel..
It currently has 0 GitHub stars and 5.739 downloads on Packagist (latest version v1.1.1).
Install it with composer require broken-titan/laravel-idempotency-middleware.
Discover more Laravel packages by broken-titan
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to add an indempotentcy to Laravel requests.
Install this package with Composer:
composer require broken-titan/laravel-idempotency-middleware
There are three configuration values in use which all have defaults. They can be overwritten in config/idempotency.php.
You can also pass route-specific parameters in the routes file when setting the middleware.
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");
A Docker compose file is included that allows you to run tests for this package.
If you discover any security issues that would affect existing users, please email [email protected] instead of using the issue tracker.
Feel free to contribute to the package.
The MIT License (MIT). Please see License File for more information.