This commit is contained in:
2025-04-25 16:54:54 +08:00
parent 83d7395072
commit 907490a4a5
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -15,8 +15,10 @@ class LocationController
{
$locations = Location::hasVehicles()
->with('vehicles')
->with('fboVehicles')
->get()
->map(function ($location) {
$location->fbo_vehicle_count = $location->fbo_vehicles->count();
$location->vehicle_count = $location->vehicles->count();
return $location;
});