ideas
ideas copied to clipboard
Support an `updateOrCreate()` method for Entry and Term repositories
The work from statamic/cms#9815 is a great idea from @godismyjudge95, however, Jason noted there's some complexity to implement these methods into Statamic as-is. Totally understandable, so I wanted to create a formal post here to document this feature request.
We've been working with a number of clients and migrating their content to a new Statamic build. Part of that usually involves creating some quick commands to import their content into the CMS. Because the build can take a bit of time, we find our imports are rarely one-and-done. Having an updateOrCreate() would allow us to easily:
- Update existing entries that have been imported
- Create new entries that have not yet been imported