Selecting up_votes - down_votes as total_votes and ordering them with laravel -


hi there have trouble getting sum of following query , orderby highest sum.

counters::orderby('up_votes - down_votes total_votes', 'desc')->take(10)->get() 

counters::select(db::raw('*, up_votes - down_votes total_votes'))


Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

Android Capture Image From Camera -

oracle11g - get root domain from url Oracle sql regex_substr -