fix: explicit group by columns (#1610)

This commit is contained in:
Phan An 2022-12-03 00:34:51 +01:00 committed by GitHub
parent 67e0a470d9
commit e82eade364
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,14 @@ class ArtistRepository extends Repository
->leftJoin('interactions', static function (JoinClause $join) use ($user): void {
$join->on('interactions.song_id', '=', 'songs.id')->where('interactions.user_id', $user->id);
})
->groupBy(['artists.id', 'play_count'])
->groupBy([
'artists.id',
'play_count',
'artists.name',
'artists.image',
'artists.created_at',
'artists.updated_at',
])
->isStandard()
->orderByDesc('play_count')
->limit($count)