vendredi 21 octobre 2016

How to reverse transform request from json api to proper data using Laravel, Lumen, Dingo, Ember Data?

I am using Lumen + Dingo + Ember JS I am able to transform the response into JSON API. But when I post back the data from Ember, is it in same json api format. So I want to know is there any way to deform the json api data ?

data":{"attributes":{"size":2},"relationships":{"page":{"data":{"type":"pages","id":"2"}}},"type":"rows"}}

From above response, i want to get `size=2, pageId=2

I have properly used relationship in Lumen models.

Any idea, how can I achieve this?




Aucun commentaire:

Enregistrer un commentaire