Closed rnwonder closed 2 weeks ago
Thank you for this library It works smoothly
However, I just need clarification on how to modify the data returned in @responseBody
so I have something like this
@responseBody 200 - {"message": "Order status updated successfully", "order": <Order>.with(seller)}
This returns all the data in Order Model and Seller Model
What I want is to like modify it so it returns specific data like only id, quantity, status and seller for Order
then for seller instead of all the data in Seller Model order.seller should have only firstName, lastName and the likes
Seen it on the docs. Apologies
Thank you for this library It works smoothly
However, I just need clarification on how to modify the data returned in @responseBody
so I have something like this
@responseBody 200 - {"message": "Order status updated successfully", "order": <Order>.with(seller)}
This returns all the data in Order Model and Seller Model
What I want is to like modify it so it returns specific data like only id, quantity, status and seller for Order
then for seller instead of all the data in Seller Model order.seller should have only firstName, lastName and the likes