Today we will learn how to set the user to reach our endpoint how many times per minute correctly in order to protect our application and keep no problems due to the number of requests in excess of the limit and is often used with APIS .
For more information, visit the source :-
https://laravel.com/docs/9.x/routing#rate-limiting
https://www.youtube.com/watch?v=TQSDi3e0TxU
- An example of fetching user data, but the user has the right to call the request three times every minute
in RouteServiceProvider.php
- Here we want to customize a message that appears when user attempts fail
- To stop the feature for the time being and make the user free in the number of requests we use the function
none()
I hope you benefit from the article and I wish you a happy code.
Top comments (3)
thanks for your advice,
I will make use of these points next time. Please visit my other frying pans. You may find what pleases you :)
Please excuse my tone if i sounded rude/harsh.