fix: knowledge sort

This commit is contained in:
tokumeikoi 2021-07-16 17:46:36 +09:00
parent 77aec7d553
commit 230470c037

View File

@ -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]);
}