Bugfix Order

This commit is contained in:
2015-10-21 15:54:06 +02:00
parent 4ee50d5571
commit e5cfb4b5a9
2 changed files with 14 additions and 7 deletions

View File

@@ -501,7 +501,7 @@ Route::get('stats', function() {
'name' => 'Bewertet am besten',
'entr' => array('', ''),
'vals' => Comment::addselect(DB::raw('film_comments.*, ROUND(AVG(`bewertung`),1) as count'))
->where('bewertung', '!=', 0)->groupBy('user')->orderBy('count', 'DESC')->take(3)->get(),
->where('bewertung', '!=', 0)->groupBy('user')->orderBy('count', 'DESC')->raw('ORDER BY COUNT(*) DESC')->take(3)->get(),
'prop' => 'autor',
'type' => 'User'
),
@@ -509,7 +509,7 @@ Route::get('stats', function() {
'name' => 'Bewertet am schlechtesten',
'entr' => array('', ''),
'vals' => Comment::addselect(DB::raw('film_comments.*, ROUND(AVG(`bewertung`),1) as count'))
->where('bewertung', '!=', 0)->groupBy('user')->orderBy('count', 'ASC')->take(3)->get(),
->where('bewertung', '!=', 0)->groupBy('user')->orderBy('count', 'ASC')->raw('ORDER BY COUNT(*) ASC')->take(3)->get(),
'prop' => 'autor',
'type' => 'User'
),