So I have a couple of relational tables defined below
Parent DB:
public function backorderQuantities(){
return $this->hasMany(BackorderQuantity:
you can select columns of eger loading by using with :
Item::with('backorderQuantities:QUANTITY,...');
don't forgot pass forigen key of backorderQuantities table to selected columns
Edit :
for sorting by child column you should use join statement :
Item::select('items.*')->leftJoin('items.ITEMNMBR','=','backorderQuantities.ITEMNMBR')->groupBy('backorderQuantities.ITEMNMBR')->orderBy('backorderQuantities.backorderQuantities')
You will need to use join instead of eager loading.
Similar question already exists on the Laracasts forum: here