mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Fixed #4437 - pagination for maintenances
This commit is contained in:
parent
3e5e6ba99a
commit
498fc3762d
|
@ -56,11 +56,9 @@ class AssetMaintenancesController extends Controller
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$total = $maintenances->count();
|
||||||
$maintenances = $maintenances->skip($offset)->take($limit)->get();
|
$maintenances = $maintenances->skip($offset)->take($limit)->get();
|
||||||
|
return (new AssetMaintenancesTransformer())->transformAssetMaintenances($maintenances, $total);
|
||||||
|
|
||||||
return (new AssetMaintenancesTransformer())->transformAssetMaintenances($maintenances, $maintenances->count());
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue