diff --git a/app/AdminAgent/Actions/Tree/LoadSystemCategory.php b/app/AdminAgent/Actions/Tree/LoadSystemCategory.php index e290652..aefddd8 100644 --- a/app/AdminAgent/Actions/Tree/LoadSystemCategory.php +++ b/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(); } }