File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -602,12 +602,13 @@ public function index(RestifyRequest $request)
602602 $ request , $ items ->map (fn (self $ repository ) => $ repository ->resource ), RepositoryCollection::meta ($ paginator ->toArray ())
603603 ) ?? RepositoryCollection::meta ($ paginator ->toArray ()),
604604 'links ' => RepositoryCollection::paginationLinks ($ paginator ->toArray ()),
605- 'data ' => $ items ->map (fn (self $ repository ) => $ repository ->serializeForIndex ($ request )),
605+ 'data ' => $ this -> indexCollection ( $ request , $ items) ->map (fn (self $ repository ) => $ repository ->serializeForIndex ($ request )),
606606 ]);
607607 }
608608
609- public function indexPaginator (RestifyRequest $ request)
609+ public function indexCollection (RestifyRequest $ request, Collection $ items ): Collection
610610 {
611+ return $ items ;
611612 }
612613
613614 public function resolveIndexMainMeta (RestifyRequest $ request , Collection $ items , array $ paginationMeta ): array
You can’t perform that action at this time.
0 commit comments