From 5d052fa4312e5cc1728b362f51c1742869df5780 Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Wed, 28 May 2025 13:31:56 +0800 Subject: [PATCH] 1 --- app/controller/LocationController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controller/LocationController.php b/app/controller/LocationController.php index ca06aca..dac3aaa 100644 --- a/app/controller/LocationController.php +++ b/app/controller/LocationController.php @@ -19,6 +19,7 @@ class LocationController ->map(function ($location) { $location->vehicle_count = $location->vehicles->count(); $location->fbo_vehicle_count = $location->fboVehicles->count(); + $location->count = ($location->vehicle_count > 0) ? $location->vehicle_count : $location->fbo_vehicle_count; return $location; }); return Util::success($locations);