Merge pull request #2138 from billmn/api-groups-order

Api groups order
This commit is contained in:
James Brooks
2016-10-06 08:56:50 +01:00
committed by GitHub

View File

@@ -62,7 +62,7 @@ class ComponentGroupController extends AbstractApiController
$groups->search(Binput::except(['sort', 'order', 'per_page']));
if ($sortBy = Binput::get('sort')) {
$direction = Binput::has('order') && Binput::get('order') == 'desc';
$direction = Binput::get('order', 'asc');
$groups->sort($sortBy, $direction);
}