Skip to content

Commit 056aa2e

Browse files
committed
Directly use and set the paginator collection
1 parent c886447 commit 056aa2e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/DataTableResponder.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,14 @@ private function paginateQuery(Builder $query)
128128
*/
129129
private function manipulateCollection($results)
130130
{
131+
$collection = $results->getCollection();
131132
$manipulator = $this->collectionManipulator;
132133

133-
if($manipulator) {
134-
$manipulated = $manipulator($results);
134+
if ($manipulator) {
135+
$manipulated = $manipulator($collection);
135136

136137
if ($manipulated) {
137-
return $manipulated;
138+
$results->setCollection($manipulated);
138139
}
139140
}
140141

0 commit comments

Comments
 (0)