Replies: 1 comment 1 reply
-
Yes. This is how it is expected to be done. Lucid doesn't serialize everything, since it is very much possible that you may have sensitive data inside the Also, creating a computed property makes it more explicit and easy to reason about. Since anyone looking at the model can see that |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What a best wat to serialize withCount
Now after
lucid put items_count into $extras and doesn't serialize when prepare response
For this I need to parse products manually or make computed param in Product model
@adonisjs/[email protected]
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions