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++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -