Hey kartik,
Laravel includes a middleware to rate limit access to routes within your application. To get started, assign the throttle middleware to a route or a group of routes.
The throttle middleware accepts two parameters that determine the maximum number of requests that can be made in a given number of minutes. For example, let’s specify that an authenticated user may access the following group of routes 60 times per minute:
Route::middleware(‘auth:api’, ‘throttle:60,1’)->group(function () {
Route::get(‘/user’, function () {
//
});
});
Hope you try this so that you can understand how it works
Thank you!!