Replies: 6 comments
-
https://tailflow.github.io/laravel-orion-docs/v2.x/guide/query-parameters.html#including-relations |
Beta Was this translation helpful? Give feedback.
-
@jeroenqui i guess that is for GET API. |
Beta Was this translation helpful? Give feedback.
-
Hi @atapatel, At this point, it is not possible to create both model and relation resource in one query. It is possible, however, to do that in two queries, but you would need both model and relation controllers in place. Another option would be to utilize |
Beta Was this translation helpful? Give feedback.
-
@alexzarbn I agree code will be duplicated :) |
Beta Was this translation helpful? Give feedback.
-
@alexzarbn Any updates on this? Because this is most common requirement in API development. |
Beta Was this translation helpful? Give feedback.
-
@alexzarbn any chance to get this feature added? |
Beta Was this translation helpful? Give feedback.
-
First of all I would like to thank you tailflow team to create such a nice and wonder full package for Laravel Community. I just want to know How can I create resource with relational data.
For Example.
Product -> hasMany -> ProductVariant
-> I want to create single API point to create Product with ProductVariant then how can I do it?
Beta Was this translation helpful? Give feedback.
All reactions