How is it possible to store data in the database for a limited time (like for example 1 hour)?
A user searches a certain thing, the logic is executed server-side and the search result is loaded. As the result is loaded, I want to store it in MySQL and keep it only x hours. After x hours this data should be deleted from the database.
How is it possible to do this in Laravel or in PHP (It does not matter for me. I just mentioned about Laravel as it may have some libraries for this)? Is it about writing logic in SQL or it's a PHP task?
How to do this? Any suggestions/links/solutions?
Thank you very much!