Download the PHP package wendelladriel/laravel-idempotency without Composer

On this page you can find all versions of the php package wendelladriel/laravel-idempotency. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-idempotency

Laravel Idempotency

Laravel Idempotency

HTTP idempotency middleware for Laravel applications

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Documentation Total Downloads

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 default; disabling one leaves the key free for a retry instead of replaying a stored failure.

You may also use the idempotent middleware alias:

If you prefer attributes, use the package's #[Idempotent] attribute on a controller class or method:

Generate a key in application code when needed:

Inspect and prune cached entries with the included Artisan commands:

Access the full documentation here.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Laravel Idempotency! You can read the contribution guide here.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Laravel Idempotency is open-sourced software licensed under the MIT license.


All versions of laravel-idempotency with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wendelladriel/laravel-idempotency contains the following files

Loading the files please wait ...