File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ public function index(RestifyRequest $request)
591591 : ($ request ->perPage ?? static ::$ defaultPerPage )
592592 );
593593
594- $ items = $ paginator ->getCollection ()->map (function ($ value ) {
594+ $ items = $ this -> indexCollection ( $ request , $ paginator ->getCollection () )->map (function ($ value ) {
595595 return static ::resolveWith ($ value );
596596 })->filter (function (self $ repository ) use ($ request ) {
597597 return $ repository ->authorizedToShow ($ request );
@@ -602,7 +602,7 @@ 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 ' => $ this -> indexCollection ( $ request , $ items) ->map (fn (self $ repository ) => $ repository ->serializeForIndex ($ request )),
605+ 'data ' => $ items ->map (fn (self $ repository ) => $ repository ->serializeForIndex ($ request )),
606606 ]);
607607 }
608608
You can’t perform that action at this time.
0 commit comments