mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed broken pagination on status labels API
This commit is contained in:
parent
f3526eccb9
commit
869de3d251
|
@ -9,13 +9,13 @@ use App\Helpers\Helper;
|
||||||
class StatuslabelsTransformer
|
class StatuslabelsTransformer
|
||||||
{
|
{
|
||||||
|
|
||||||
public function transformStatuslabels (Collection $statuslabels)
|
public function transformStatuslabels (Collection $statuslabels, $total)
|
||||||
{
|
{
|
||||||
$array = array();
|
$array = array();
|
||||||
foreach ($statuslabels as $statuslabel) {
|
foreach ($statuslabels as $statuslabel) {
|
||||||
$array[] = self::transformStatuslabel($statuslabel);
|
$array[] = self::transformStatuslabel($statuslabel);
|
||||||
}
|
}
|
||||||
return (new DatatablesTransformer)->transformDatatables($array);
|
return (new DatatablesTransformer)->transformDatatables($array, $total);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function transformStatuslabel (Statuslabel $statuslabel)
|
public function transformStatuslabel (Statuslabel $statuslabel)
|
||||||
|
|
Loading…
Reference in a new issue