adonis order by relation
snippet in javascript

adonis order by relation

user7417

// you must join relation first
User.query()
.join('colaborator_data', 'colaborator_data.doctor_id', '=', 'users.id')