json-api-server
json-api-server copied to clipboard
Handle relationship URLs
trafficstars
As per: https://jsonapi.org/format/#fetching-relationships https://jsonapi.org/format/#crud-updating-relationships
These can be handled automatically via the Update endpoint.
PATCH: $resource->setValue(...)
POST: $resource->attach($model, $field, $related)
DELETE: $resource->detach(...)