dimanche 7 février 2016

Laravel simultaneous request with database edition

So I've made a script for my project that allow the user to transfer his credits on a game (for example), the transfer function is executed with a get and with as an argument the amount of credits you want to transfer.

The problem is that if the user make the same request at the same time (twice or more), he will be able to duplicate his credits, is there any fix against this bug? Like locking the session or anything when in use?

Session storage use the file driver



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire