Throttling submission of form in Laravel

1 · Amit Merchant · Nov. 22, 2020, 12:45 p.m.
You might face a scenario where you’d want to restrict a user from submitting a form within a certain time limit. i.e to prevent spamming by users. For instance, let’s say, you want to restrict a user to submit a form only once in a timeframe of five minutes. This could be a public message board. If he/she tries to submit the form again in the next five minutes, they won’t be able to. How would you do that? Well, Laravel’s custom validation rules or rule objects can be put to use here. Create a ...