Update withCounts because Laravel 5.5 :(

This commit is contained in:
snipe
2018-07-24 22:40:05 -07:00
parent e6dd90e055
commit 0714ac4248
23 changed files with 32 additions and 31 deletions
@@ -26,7 +26,7 @@ class BulkAssetModelsController extends Controller
if ((is_array($models_raw_array)) && (count($models_raw_array) > 0)) {
$models = AssetModel::whereIn('id', $models_raw_array)
->withCount('assets')
->withCount('assets as assets_count')
->orderBy('assets_count', 'ASC')
->get();
@@ -107,7 +107,7 @@ class BulkAssetModelsController extends Controller
if ((is_array($models_raw_array)) && (count($models_raw_array) > 0)) {
$models = AssetModel::whereIn('id', $models_raw_array)->withCount('assets')->get();
$models = AssetModel::whereIn('id', $models_raw_array)->withCount('assets as assets_count')->get();
$del_error_count = 0;
$del_count = 0;