Fixed the collection of the groups total to GroupsTransformer.php. Groups page should now paginate correctly.

This commit is contained in:
Alex Janes 2021-12-23 20:54:34 -05:00
parent 312200bf44
commit d0bfd8dfd2

View file

@ -9,13 +9,13 @@ use Illuminate\Database\Eloquent\Collection;
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)