Merge branch 'develop'

This commit is contained in:
snipe 2018-02-21 16:47:03 -08:00
commit d60a4c5f87

View file

@ -38,7 +38,7 @@ class ComponentsController extends Controller
$offset = request('offset', 0); $offset = request('offset', 0);
$limit = request('limit', 50); $limit = request('limit', 50);
$allowed_columns = ['id','name','min_amt','qty','order_number','serial','purchase_date','purchase_cost','company','category','qty','location','image']; $allowed_columns = ['id','name','min_amt','order_number','serial','purchase_date','purchase_cost','company','category','qty','location','image'];
$order = $request->input('order') === 'asc' ? 'asc' : 'desc'; $order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at'; $sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';