You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following request fetches an article’s author:
GET /articles/1/author HTTP/1.1Accept: application/vnd.api+json
These URLs can be implemented automatically as part of the Show endpoint.
For ToOne relationships, we simply get the value of the relationship and show it.
For ToMany relationships, will need to add a queryRelated($model, $field) method to the resource. We then pass this query into the relationship's collection and make filters, pagination etc available.
The text was updated successfully, but these errors were encountered:
@tobyzerner how far out do you think this is? I'm currently evaluating this package for a new project and this would be the main feature missing currently.
As per https://jsonapi.org/format/#fetching-resources:
These URLs can be implemented automatically as part of the
Show
endpoint.For ToOne relationships, we simply get the value of the relationship and show it.
For ToMany relationships, will need to add a
queryRelated($model, $field)
method to the resource. We then pass this query into the relationship's collection and make filters, pagination etc available.The text was updated successfully, but these errors were encountered: