nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
71 stars 35 forks source link

Support to-many relations in included resources. #84

Closed HennerM closed 7 years ago

HennerM commented 7 years ago

I noticed an issue while using your awesome library.

It's currently not possible to include "to-many" relations that are defined in included resources. For example if you have Post and Comment objects like in your unit tests and you want to include an array of "likes" in the Comment object, these aren't included in the result.

Because this is my first pull request, I welcome all kinds of critique. ;)

HennerM commented 7 years ago

Any updates on this one? It looks like this is also the cause for https://github.com/nilportugues/laravel5-jsonapi/issues/39.