authorize('owner', $playlist); return response()->json( $playlist->is_smart ? $this->smartPlaylistService->getSongs($playlist)->pluck('id') : $playlist->songs->pluck('id') ); } /** @deprecated */ public function update(PlaylistSongUpdateRequest $request, Playlist $playlist) { $this->authorize('owner', $playlist); abort_if($playlist->is_smart, 403, 'A smart playlist cannot be populated manually.'); $this->playlistService->populatePlaylist($playlist, (array) $request->songs); return response()->noContent(); } }