S
S
Snewer2017-04-03 13:45:18
Yii
Snewer, 2017-04-03 13:45:18

How to manage relationships in RESTful?

Hello!
How to manage relationships in a RESTful API, such as many-to-many. How to add, remove?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2017-04-03
@karminski

Yes, stop! Models are responsible for working with relationships. REST is about controller and actions. You create a REST action (like adding a new blog post) that processes the REST controller and passes control to the model. And now this model determines how to work with connections.
Those. "working with relationships" is no different from the standard
www.yiiframework.com/doc-2.0/guide-db-active-recor...

S
Shirshov Alexander, 2017-04-03
@Keanor

Perhaps what you are looking for is called HAL stateless.co/hal_specification.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question