Skip to content

Commit

Permalink
Fixed the collection of the groups total to GroupsTransformer.php. Gr…
Browse files Browse the repository at this point in the history
…oups page should now paginate correctly.
  • Loading branch information
adagioajanes committed Dec 24, 2021
1 parent 312200b commit d0bfd8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Transformers/GroupsTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
class GroupsTransformer
{

public function transformGroups (Collection $groups)
public function transformGroups (Collection $groups, $total = null)
{
$array = array();
foreach ($groups as $group) {
$array[] = self::transformGroup($group);
}
return (new DatatablesTransformer)->transformDatatables($array);
return (new DatatablesTransformer)->transformDatatables($array, $total);
}

public function transformGroup (Group $group)
Expand Down

0 comments on commit d0bfd8d

Please sign in to comment.