songRepository->getMany(ids: $request->songs, scopedUser: $this->user) ->each(fn ($song) => $this->authorize('interact', $song)); $interactions = $this->interactionService->batchLike(Arr::wrap($request->songs), $this->user); return response()->json($interactions); } public function destroy(BatchInteractionRequest $request) { $this->songRepository->getMany(ids: $request->songs, scopedUser: $this->user) ->each(fn ($song) => $this->authorize('interact', $song)); $this->interactionService->batchUnlike(Arr::wrap($request->songs), $this->user); return response()->noContent(); } }