collection->map(fn (Playlist $playlist): PlaylistJsonResource => new PlaylistJsonResource($playlist, $this->query))->all(); } }