I've some problems due to multiple form submissions. I'm using laravel as framework and creating a browsergame (I know, there are millions) just for fun.
I've a page for buildings with a button "Construct" which is in a form (method="post").
If I hold Enter for 4-5 seconds many request will be fired and the user can create many records in the database.
I don't want an only client side fix like
$(document).on('submit', 'form', function() {
$(this).find('button:submit, input:submit').attr('disabled', 'disabled);
});
Because never trust the client.
Is someone here with a solution (maybe with laravel)?
Thanks in advance.
Best regards.