liyinglin 2 years ago
parent 9370340e13
commit 23285fd707

@ -248,7 +248,7 @@ class OrdersController extends CommonController
->addSelect([
'beds_count' => Bed::whereColumn('area_id', 'area.id')->selectRaw('count(1)'),
])
->where('beds_count', '>', 0)
->having('beds_count', '>', 0)
->leftJoin("building", "area.building_id", "=", "building.id")
->addSelect("building.name as building_name")
->withCount("beds")

Loading…
Cancel
Save