Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahsan's avatar
Level 46

last ticket sold process handle with multiple users requests

for example last ticket left to sale

multiple users requests at same time but processing take little time.

how to handle this scenario?

there are 1 lesson at laracasts about this scenario but can't find at this time.

0 likes
3 replies
arukomp's avatar

Could use Redis to store whether that ticket has been sold.

As soon as the first request comes in, you mark it as sold in Redis and then proceed with the rest of the process.

Because Redis is quick, any following requests coming in should check Redis and see whether that ticket has already been sold.

ahsan's avatar
Level 46

there are lesson available at laracasts about this scenario if anybody know?

i want to do with mysql redis is not required.

2 likes

Please or to participate in this conversation.