From 20385733e8834a38537f4c2a41c835d7cb86462c Mon Sep 17 00:00:00 2001 From: liapples Date: Sat, 9 Oct 2021 17:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0withTrashed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Extensions/Grid/AuditAgent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Admin/Extensions/Grid/AuditAgent.php b/app/Admin/Extensions/Grid/AuditAgent.php index 9782f7c..d0957d8 100644 --- a/app/Admin/Extensions/Grid/AuditAgent.php +++ b/app/Admin/Extensions/Grid/AuditAgent.php @@ -56,7 +56,7 @@ class AuditAgent extends RowAction # 写入默认初始数据 //代理商产品分类 - if (!Category::where('agent_id', $id)->first()) { + if (!Category::withTrashed()->where('agent_id', $id)->first()) { $default_category = Category::where('agent_id', 0)->orderBy('id')->get()->toArray(); $default_category = array_map(function ($v) use ($id) { @@ -75,7 +75,7 @@ class AuditAgent extends RowAction } //代理商频道列表 - if (!Channel::where('agent_id', $id)->first()) { + if (!Channel::withTrashed()->where('agent_id', $id)->first()) { $default_channel = Channel::where('agent_id', 0)->orderBy('id')->get()->toArray(); $default_channel = array_map(function ($v) use ($id, $host) {