From a3cfcf9df5b6961a187030d91efa650b483e736e Mon Sep 17 00:00:00 2001 From: TL Date: Tue, 16 Aug 2022 17:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Admin/Http/Controllers/CustomerController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beike/Admin/Http/Controllers/CustomerController.php b/beike/Admin/Http/Controllers/CustomerController.php index c93a4dbd..5ca6ead5 100644 --- a/beike/Admin/Http/Controllers/CustomerController.php +++ b/beike/Admin/Http/Controllers/CustomerController.php @@ -50,9 +50,10 @@ class CustomerController extends Controller return json_success('创建成功!', new CustomerResource($customer)); } - public function edit(Request $request, Customer $customer) + public function edit(Request $request, int $customerId) { - $addresses = AddressRepo::listByCustomer($customer->id); + $addresses = AddressRepo::listByCustomer($customerId); + $customer = CustomerRepo::find($customerId); $data = [ 'customer' => $customer, 'customer_groups' => CustomerGroupDetail::collection(CustomerGroupRepo::list())->jsonSerialize(),