json([ 'most_played_songs' => SongResource::collection($this->songRepository->getMostPlayed()), 'recently_played_songs' => SongResource::collection($this->songRepository->getRecentlyPlayed()), 'recently_added_albums' => AlbumResource::collection($this->albumRepository->getRecentlyAdded()), 'recently_added_songs' => SongResource::collection($this->songRepository->getRecentlyAdded()), 'most_played_artists' => ArtistResource::collection($this->artistRepository->getMostPlayed()), 'most_played_albums' => AlbumResource::collection($this->albumRepository->getMostPlayed()), ]); } }