Merge pull request #2056 from dmeltzer/make-categories-limit-work

Make limit/offset work in getDataView
This commit is contained in:
snipe 2016-05-19 19:50:22 -07:00
commit db6305bf1f

View file

@ -326,7 +326,7 @@ class CategoriesController extends Controller
$allowed_columns = ['id','name','serial','asset_tag'];
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
$count = $category_assets->count();
$category_assets = $category_assets->skip($offset)->take($limit)->get();
$rows = array();
foreach ($category_assets as $asset) {