LaravelPackages.net
Acme Inc.
Toggle sidebar
mydnic/laravel-allow-long-request

Simple Middleware Allowing Long Requests

571
0
v2.4.0
About mydnic/laravel-allow-long-request

mydnic/laravel-allow-long-request is a Laravel package for simple middleware allowing long requests. It currently has 0 GitHub stars and 571 downloads on Packagist (latest version v2.4.0). Install it with composer require mydnic/laravel-allow-long-request. Discover more Laravel packages by mydnic or browse all Laravel packages to compare alternatives.

Last updated

A Simple Middleware for Laravel Allowing Long Requests

Latest Version on Packagist Software License Build Status Code Quality

Installation

You can install this package via composer using this command:

composer require mydnic/laravel-allow-long-request

The package will automatically register itself

You can publish the config-file with:

php artisan vendor:publish --provider="Mydnic\AllowLongRequests\AllowLongRequestsServiceProvider" --tag="config"

Usage

In your Kernel.php you can register the middleware like this:

protected $routeMiddleware = [
    // ...
    'allow-long-request' => \Mydnic\AllowLongRequests\Http\Middleware\AllowLongRequests::class,
]

Now you can apply the middleware on the route of your choice

Route::get('/', function () {
    // code that takes a long time to execute
})->middleware('allow-long-request');

You can set the max waiting time in the config file.

Comments
Affiliate link

Get paid by clients abroad

Wise gives you local bank details in several currencies and converts at the mid-market rate. Useful when your invoices are not in your own currency.

Try Wise

Star History Chart

Get the next ones by email

New Laravel packages worth a look, once a month. No spam, one-click unsubscribe.