Browse Source

优化写法

master
李可松 4 years ago
parent
commit
f1f0278239
  1. 4
      app/AdminAgent/Actions/Tree/LoadSystemCategory.php

4
app/AdminAgent/Actions/Tree/LoadSystemCategory.php

@ -57,7 +57,9 @@ class LoadSystemCategory extends AbstractTool
$sys_pid = $system_pid[$cate['name']];
if ($sys_pid != 0) {
$sys_pid_name = $system_cate->find($sys_pid)['name'];
Category::where('id', $cate->id)->update(['pid' => $own_id[$sys_pid_name]]);
$cate->pid = $own_id[$sys_pid_name];
$cate->save();
}
}

Loading…
Cancel
Save