added: playlist sort by favourite_count on initial request

update: added composer lock file to gitignore
This commit is contained in:
Maximilian Walter 2016-05-25 22:58:41 +02:00
parent cea48c6d83
commit 950ef3b585
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View file

@ -6,4 +6,5 @@ Homestead.yaml
.env
.vagrant
_ide_helper.php
.idea
.idea
composer.lock

View file

@ -72,7 +72,7 @@ class PlaylistsController extends ApiControllerBase
$query = Playlist::summary()
->with('user', 'user.avatar', 'tracks', 'tracks.cover', 'tracks.user', 'tracks.album', 'tracks.album.user')
->userDetails()
->orderBy('title', 'asc')
->orderBy('favourite_count', 'desc')
->where('track_count', '>', 0)
->whereIsPublic(true);