Bugfix Order
This commit is contained in:
@@ -28,12 +28,13 @@ class Film extends Eloquent {
|
||||
return $query
|
||||
->addSelect(DB::raw('film_films.*, COUNT(case when film_votes.stimme IS TRUE then 1 end) as upvotes'))
|
||||
->leftJoin('votes', 'votes.film', '=', 'films.id')
|
||||
->leftJoin('users', 'users.id', '=', 'votes.user')
|
||||
->whereNull('gesehen')
|
||||
->where('films.id', "!=", is_object($nextfilm) ? $nextfilm->id : 0)
|
||||
->where('users.settings', 'NOT LIKE', '%disabled":true%')
|
||||
->groupBy('films.id')
|
||||
->orderBy('upvotes', 'DESC')
|
||||
->orderBy('vorgeschlagen', 'ASC')
|
||||
->take(5);
|
||||
->orderBy('vorgeschlagen', 'ASC');
|
||||
}
|
||||
|
||||
public function getVotes() {
|
||||
|
Reference in New Issue
Block a user