PHPackages                             filipefernandes/laravel-route-retry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. filipefernandes/laravel-route-retry

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

filipefernandes/laravel-route-retry
===================================

A Laravel package to capture and retry failing requests.

0.0.1(5mo ago)21.2k—6.1%MITPHPPHP ^8.1CI passing

Since Jan 9Pushed 5mo agoCompare

[ Source](https://github.com/filipefernandes9747/laravel-route-retry)[ Packagist](https://packagist.org/packages/filipefernandes/laravel-route-retry)[ RSS](/packages/filipefernandes-laravel-route-retry/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Laravel Route Retry
===================

[](#laravel-route-retry)

[![Thumbnail](assets/thumbnail.png)](assets/thumbnail.png)

Laravel Route Retry adds a simple and flexible way to capture failed requests (5xx) and retry them later. It's perfect for handling transient failures in webhooks, external API calls, or any critical route.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require filipefernandes/laravel-route-retry
```

You can publish the config file with:

```
php artisan vendor:publish --tag="retry-config"
```

Then, run the migrations:

```
php artisan migrate
```

Usage
-----

[](#usage)

### Simple Route Retry

[](#simple-route-retry)

You can enable retries on any route using the `retry()` macro:

```
use Illuminate\Support\Facades\Route;

Route::post('/webhooks/stripe', function () {
    // If this fails with 5xx, it will be captured
})->retry(3); // Retry up to 3 times
```

### Adding Tags

[](#adding-tags)

Tags help you filter and process retries for specific features:

```
Route::post('/sync-data', [SyncController::class, 'handle'])
    ->retry(5)
    ->tags(['erp', 'priority-high']);
```

### Processing Retries

[](#processing-retries)

To process pending retries, add the following command to your `app/Console/Kernel.php`:

```
$schedule->command('retry:process')->everyMinute();
```

You can also filter retries by tag or ID:

```
php artisan retry:process --tag=erp
php artisan retry:process --id=1 --id=2 --id=3
php artisan retry:process --fingerprint=a8...
```

### Disabling Middleware

[](#disabling-middleware)

If you need to retry requests without running the original route middleware (e.g., if authentication tokens have expired), use the `--without-middleware` option:

```
php artisan retry:process --without-middleware
```

Configuration
-------------

[](#configuration)

The published configuration file `config/retry.php` allows you to customize:

- `table_name`: The table where retries are stored.
- `storage_disk`: The disk used for temporary file storage (defaults to `local`).
- `max_retries`: Global default for maximum retry attempts.
- `delay`: The initial delay before the first retry attempt.

Events
------

[](#events)

The package dispatches events throughout the retry lifecycle:

- `LaravelRouteRetry\Events\RequestCaptured`: Dispatched when a failure is first captured.
- `LaravelRouteRetry\Events\RetrySucceeded`: Dispatched when a retry attempt results in a 2xx response.
- `LaravelRouteRetry\Events\RetryFailed`: Dispatched when a retry fails or reaches the maximum limit.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance71

Regular maintenance activity

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

176d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44c4a0ab684a6ff2f571c5b6b1db79320570f053120dadb2793c9b8ee41529a3?d=identicon)[filipe9747](/maintainers/filipe9747)

---

Top Contributors

[![ffernandes9747](https://avatars.githubusercontent.com/u/106343739?v=4)](https://github.com/ffernandes9747 "ffernandes9747 (4 commits)")[![filipefernandes9747](https://avatars.githubusercontent.com/u/22693486?v=4)](https://github.com/filipefernandes9747 "filipefernandes9747 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/filipefernandes-laravel-route-retry/health.svg)

```
[![Health](https://phpackages.com/badges/filipefernandes-laravel-route-retry/health.svg)](https://phpackages.com/packages/filipefernandes-laravel-route-retry)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
