API to Create a New Product
In this lesson, we’ll build an API to create a new product.
We'll cover the following...
Introduction
As part of building an e-commerce application, we’ve already built the back-end for categories.
The most important part of an online shop is products. We’re going to create product back-end APIs.
Now that we have some categories, it’s time to make the product APIs. First, we’ll create the model, then we’ll create the repository, then we’ll make the service. Finally, we’ll create and test the controller.
Model
The product will have an id
, name
, imageURL
, price
, and ...