From 268308004cc624e42dbcfe4abb1ca9c11e35e850 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Jan 2017 23:45:03 -0800 Subject: [PATCH] Fixed number of results returned --- app/Http/Controllers/Api/AssetsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 29ce11ba38..417e1a905b 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -158,9 +158,9 @@ class AssetsController extends Controller $assets = $assets->orderBy($sort, $order); break; } - - $assetCount = $assets->count(); + $assets = $assets->skip($offset)->take($limit)->get(); + $assetCount = $assets->count(); $rows = array(); foreach ($assets as $asset) {