mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge pull request #2056 from dmeltzer/make-categories-limit-work
Make limit/offset work in getDataView
This commit is contained in:
commit
db6305bf1f
|
@ -326,7 +326,7 @@ class CategoriesController extends Controller
|
||||||
$allowed_columns = ['id','name','serial','asset_tag'];
|
$allowed_columns = ['id','name','serial','asset_tag'];
|
||||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||||
$count = $category_assets->count();
|
$count = $category_assets->count();
|
||||||
|
$category_assets = $category_assets->skip($offset)->take($limit)->get();
|
||||||
$rows = array();
|
$rows = array();
|
||||||
|
|
||||||
foreach ($category_assets as $asset) {
|
foreach ($category_assets as $asset) {
|
||||||
|
|
Loading…
Reference in a new issue