How to allow the use of a daily button for each user in php

I would like to know if there is any method with which I can unlock a button every 24 hours for each user who is registered, I search but I did not find anything that can help me.

If there is a composer library it would help me too.