From 5ebfc8a4475309f41d425a053fa26c0774f48c64 Mon Sep 17 00:00:00 2001 From: TL Date: Wed, 6 Jul 2022 15:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E4=BC=9A=E5=91=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Admin/Http/Resources/CustomerResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beike/Admin/Http/Resources/CustomerResource.php b/beike/Admin/Http/Resources/CustomerResource.php index eb9bd0c7..6cc1ddbe 100644 --- a/beike/Admin/Http/Resources/CustomerResource.php +++ b/beike/Admin/Http/Resources/CustomerResource.php @@ -21,7 +21,7 @@ class CustomerResource extends JsonResource 'status' => $this->status ? '启用' : '禁用', 'avatar' => image_resize($this->avatar), 'from' => $this->from, - 'customer_group_name' => $this->customerGroup->description->name, + 'customer_group_name' => $this->customerGroup->description->name ?? '', 'edit' => admin_route('customers.edit', $this->id), 'delete' => admin_route('customers.destroy', $this->id), ];