Browse Source

增加withTrashed

master
李可松 4 years ago
parent
commit
20385733e8
  1. 4
      app/Admin/Extensions/Grid/AuditAgent.php

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

Loading…
Cancel
Save