I have the lifecycle afterUpdate
on a content type, and I would like to loop through all the records and activate the lifecycle to update the data on all the records. What is the best way to do this?
I have tried to make a plugin with a button on the homepage, but I can’t get this to work, and I wonder if there is an easier way to do this.
Right now I am trying to:
- Use Axios to get all records.
- Loop through all results.
- Use the ID to update the records, one by one, by submitting empty data.