Make limit/offset work in getDataView

This commit is contained in:
Daniel Meltzer 2016-05-19 21:45:48 -05:00
parent 2b1bf9f7f3
commit 1148750c9a

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) {