From f1f027823913bc24764e67ef68c75b98cdb44113 Mon Sep 17 00:00:00 2001 From: liapples Date: Sun, 10 Oct 2021 00:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminAgent/Actions/Tree/LoadSystemCategory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } }