Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PANDISHARATHI's avatar

Laravel 10 too many request

in my application laravel 10 and write a api the check with post man 3 to 4 user same time login get too many request issue how to fix this issue.

0 likes
2 replies
MouteeSabouni's avatar

@pandisharathi The "Too Many Requests" issue you're encountering in your Laravel 10 application is likely due to the built-in rate limiting functionality. Laravel automatically applies rate limiting to API routes to prevent abuse.

Try this

Route::middleware('throttle:login')->group(function () {
    Route::post('/login', [AuthController::class, 'login']);
});

Then, define your custom rate limit logic in the App\Providers\AppServiceProvider like this.

public function boot()
{
    RateLimiter::for('login', function (Request $request) {
        return Limit::perMinute(10)->by($request->ip());
    });
}

Lastly, disable throttle for specific routes using withoutMiddleware('throttle');

Please or to participate in this conversation.