Skip to content
Discussion options

You must be logged in to vote

@o15a3d4l11s2 Thanks, yes I was thinking of that as well but somehow the query is always picking up * in the SELECT.

I have now figured out a much easier, full Eloquent query, approach:

return $query->withSum('sales_invoices', 'euro_total_price_excl_tax')
    ->orderBy('sales_invoices_sum_euro_total_price_excl_tax', $columnDirection);

Works like a charm.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@malle-pietje
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by malle-pietje
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants