reactions->tally( $request->validated('target_id'), $this->currentUserUid($request), ); // 非分页列表:手工给 meta,使响应形状与规格里的 {data, meta} 一致 // FIXME: current_page / per_page / last_page 在不分页的聚合上是假值, // 只是为了套上生成器写死的 PaginationMeta,待定夺 return ReactionTallyResource::collection($items)->additional(['meta' => [ 'current_page' => 1, 'per_page' => count($items), 'total' => count($items), 'last_page' => 1, ]]); } }