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

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ Homestead.yaml
.vagrant .vagrant
_ide_helper.php _ide_helper.php
.idea .idea
composer.lock

View file

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