|
|
|
|
@ -247,9 +247,11 @@ class OrdersController extends CommonController
|
|
|
|
|
->select("area.id", "area.name", "area.building_id", "area.project_id")
|
|
|
|
|
->leftJoin("building", "area.building_id", "=", "building.id")
|
|
|
|
|
->addSelect("building.name as building_name")
|
|
|
|
|
->addSelect([
|
|
|
|
|
'beds_count' => Bed::whereColumn('area_id', 'area.id')->selectRaw('count(1)'),
|
|
|
|
|
])->having('beds_count', '>', 0)
|
|
|
|
|
// ->addSelect([
|
|
|
|
|
// 'beds_count' => Bed::whereColumn('area_id', 'area.id')->selectRaw('count(1)'),
|
|
|
|
|
// ])
|
|
|
|
|
->withCount("beds")
|
|
|
|
|
->having('beds_count', '>', 0)
|
|
|
|
|
->paginate(10);
|
|
|
|
|
$projects = (new StatisticsController())->_checkProjects();
|
|
|
|
|
return view($this->bladePath . ".artboard", compact("data", "projects", "project_id"));
|
|
|
|
|
|