title: Laravel Api receiving two requests at the same time
body: <p>I have an api in laravel 5.4 which is consumed by an android application, the problem is that I am having a competition problem, because many times the application sends 2 times the same request at the same time, generating duplicate data in the base. How to avoid this at the Laravel application level? I can not adjust the application because it is done by another company.</p>
  
  <p>As a workaround I am putting a random sleep of 1-15s before the functions to try to prevent the two requests from executing at the same time.</p>
  
  <p>Thank you!</p>