1

According to this guidance ,I added a throttle functionality to a specific route in my laravel project like this :

$api->group(['prefix' => 'auth'], function ($api) {
    $api->post('checkUser', ['middleware' => 'api.throttle', 'limit' => 3, 'expires' => 20, 'uses' => 'Auth\LoginController@checkUser']);
});

As you can see I added a throttle , limit of 3 with an expiration time of 20 minutes for this specific route.

But even I request that rout more than 3 times, no things occurred.

I do not know what is problem or is need any more step or not?

Update:

After check php artisan api:route I found that no middleware assigned to that specific route. I do not know why?

Ahmad Badpey
  • 6,348
  • 16
  • 93
  • 159

0 Answers0