findMany($request->songs); $songs->each(fn ($song) => $this->authorize('download', $song)); $downloadablePath = $service->getDownloadablePath($repository->getMany($request->songs)); abort_unless((bool) $downloadablePath, Response::HTTP_BAD_REQUEST, 'Song cannot be downloaded.'); return response()->download($downloadablePath); } }