Hi everyone, how are you?
I am new with adonis and i’m trying to build a simple app, but with some features.
My question is: How can i update a nested lucid model which belongs to a collection in runtime?
Ex of my code:
const User = use('App/Models/User') let user = await User.with('carts').first() let cart = user.carts cart.total = 250 await cart.save()
But the code above does not work, anyone can help me with the best way to do this?