Sycn function with callback

Hi there,

I’m wondering if possible use sycn function with callback, for example,

await user.cars().attach(cars, (pivotModelInstance) => {
//do something
})

Is that possible?

The documentation is not clear about that.

Best regards,

Yes, sync() uses attach() under the hood

1 Like

Thank you,