|
|
|
|
@ -224,12 +224,12 @@ class OrdersController extends CommonController
|
|
|
|
|
}
|
|
|
|
|
})->where('admin_id', $user->id)->pluck('area_id');
|
|
|
|
|
}
|
|
|
|
|
$data = Area::where(function ($query) use ($areaId, $request) {
|
|
|
|
|
$data = Area::where(function ($query) use ($areaId, $project_id) {
|
|
|
|
|
if ($areaId) {
|
|
|
|
|
$query->whereIn('id', $areaId);
|
|
|
|
|
}
|
|
|
|
|
if ($request->project_id) {
|
|
|
|
|
$query->where('project_id', $request->project_id);
|
|
|
|
|
if ($project_id) {
|
|
|
|
|
$query->where('project_id', $project_id);
|
|
|
|
|
}
|
|
|
|
|
})->with(['project',
|
|
|
|
|
"beds" => function ($query) use ($request) {
|
|
|
|
|
|