mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed the collection of the groups total to GroupsTransformer.php. Groups page should now paginate correctly.
This commit is contained in:
parent
312200bf44
commit
d0bfd8dfd2
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue