diff --git a/app/Http/Controllers/api/v1/OrderController.php b/app/Http/Controllers/api/v1/OrderController.php index 9a9a6ac..0ff69cf 100644 --- a/app/Http/Controllers/api/v1/OrderController.php +++ b/app/Http/Controllers/api/v1/OrderController.php @@ -153,14 +153,12 @@ public function unProcessed(Request $request,Responder $responder) //->whereNulll('APIConfirmed') ->whereNotNull('confirmed') ->whereNull('APIConfirmed') + ->whereHas('profitCenter', function ($query) { + $query->where('hooreycaDataActive', 1); + }) ->orderBy('id','desc')->paginate(3) ; - $filteredProfitCentersOrder=$OrderCollection->filter(function ($v) { - return $v->profitCenter!=null; - }); - $OrderCollection->setCollection($filteredProfitCentersOrder); - /* where condition not working on paginated eloquent collection dd($OrderCollection->toArray()); $OrderCollection=$OrderCollection->whereNotNull('profit_center');