public function includeBeatmapPlaycounts(User $user)
{
$beatmapPlaycounts = $user->beatmapPlaycounts()->with('beatmap', 'beatmap.beatmapset')->orderBy('playcount', 'desc')->limit(100)->get()->filter(function ($pc) {
return $pc->beatmap !== null && $pc->beatmap->beatmapset !== null;
});
return $this->collection($beatmapPlaycounts, new BeatmapPlaycountTransformer());
}