[Adonis v5] How to iterate trough related? #1716
-
Hello again 👋 🙃 I am now in a Lucid model and I am making a computed property. For this I need to iterate over a relationship // this code successfully loads my relationship, but I cannot iterate over the array
const payments = this.$getRelated("payments"); this is the error I am getting
I tried to use other array methods too, but I got the same error Am I doing something wrong or this is just not possible? |
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
Oct 7, 2020
Replies: 1 comment 3 replies
-
Why not simply use |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
melokki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not simply use
this.payments
?