From e1bd3065bcddb475d53fae96b20b422214885c8a Mon Sep 17 00:00:00 2001 From: weizong song Date: Tue, 9 Mar 2021 23:59:31 +0800 Subject: [PATCH] up --- app/Http/Controllers/Customer/OrdersController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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(); }