diff --git a/app/controller/VehicleController.php b/app/controller/VehicleController.php index b2289e5..29ba676 100644 --- a/app/controller/VehicleController.php +++ b/app/controller/VehicleController.php @@ -338,7 +338,7 @@ class VehicleController $navigate = LogisticsShip::where(['status' => 0])->get(); $pending = LogisticsShip::where(['status' => 1])->get(); foreach ($pending as &$val) { - $pending['count'] = Vehicle::where(['locations_id' => $val->id])->count(); + $val['count'] = Vehicle::where(['ship_id' => $val->id])->count(); } $result = ['navigate' => $navigate,'pending' => $pending];