We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Statamic v3, best practice programmatically manipulating data?

Chris Bachmeier June 21, 2020 by Chris Bachmeier

Hi all. I was wondering if there's something like a best practice to manipulate data... I have some code that I would like to run periodically to update some of the data in a Collection/Entries.

I was thinking to use a query to retrieve those entries and then update those fields in the data -> items array based on the defined handles. Once that's done using the EntryRepository to save those objects.

Is there a simpler approach or can someone that has more experience than I do shed some light on best practice : )

Thanks a lot for any suggestions.

>>>>>>> Unanswered <<<<<<<
2 Replies