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) {