diff --git a/app/Http/Controllers/Customer/OrdersController.php b/app/Http/Controllers/Customer/OrdersController.php index 32443f1..729f998 100644 --- a/app/Http/Controllers/Customer/OrdersController.php +++ b/app/Http/Controllers/Customer/OrdersController.php @@ -203,7 +203,8 @@ class OrdersController extends CommonController public function list() { - $data = (new Orders())->ofCustomer($this->customer->id); + //$data = (new Orders())->ofCustomer($this->customer->id); + $data = new Orders(); if (request()->keyword) { $keyword = request()->keyword; $data = $data->where(function ($query) use ($keyword) { @@ -227,17 +228,14 @@ class OrdersController extends CommonController $data = $data->with([ "project", "product", - "customer", - "manager", "patient", "productItem", - "productParamedicLevel", "building", "bed" => function ($query) { $query->with(["room", "building"]); }, "paramedic" - ])->paginate(10); + ])->paginate(5); foreach ($data as $order) { $order = $order->refreshTotal(); }