From 230470c0375ad48b9faa898775989136da956285 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Fri, 16 Jul 2021 17:46:36 +0900 Subject: [PATCH] fix: knowledge sort --- app/Http/Controllers/Admin/KnowledgeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/KnowledgeController.php b/app/Http/Controllers/Admin/KnowledgeController.php index 3c611d78..aa5cb66a 100644 --- a/app/Http/Controllers/Admin/KnowledgeController.php +++ b/app/Http/Controllers/Admin/KnowledgeController.php @@ -79,7 +79,7 @@ class KnowledgeController extends Controller DB::beginTransaction(); try { foreach ($request->input('knowledge_ids') as $k => $v) { - $knowledge = new Knowledge(); + $knowledge = Knowledge::find($v); $knowledge->timestamps = false; $knowledge->update(['sort' => $k + 1]); }