Save data using a repository in Magento
Learn how to save data using a repository in a Magento 2 setup patch with PostFactory and PostRepositoryInterface.
Lesson Content
Let’s use our newly created repository to save data within our setup patch data script. Within this apply function is where our code will go. But first, we need to inject some classes into the const...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.