'How to save last overlapping row in a queue and release older row in laravel queue

I have a main queue in Laravel and I want to run that queue every 10 minutes and split its contents into smaller queues. In small queues, some data have updates and I want the last update to be entered in the small queue and the old updates to be removed from the queue. Thanks for pointing me to how to keep the latest updates in small queues and delete older updates



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source