Routes
Routes implement the logic of your application. Each route represents an action over a the data of a model, for example getting info of a user, adding a new user, deleting a user, searching all the comments done by a user, etc. One advantadge of using Route Injector is that many of the common routes are automatically generated by route injector. Specifically Route Injector generates automatically the following routes:
route | description |
---|---|
GET /model | Get the information of a instance of the model. |
POST /model | Post a new instance of the model. |
PUT /model | Modify an instance of the model. |
DELETE /model | Deletes an instance of the model. |
GET /models | Search instances of the model. |
POST /models | Search instances of the model (more flexible). |
It also generates additional routes for managing images and relationships if your model has them.
This routes can be easily configurated and new custom ones can be added. Take into account that this routes are both used by the backoffice and the frontend.