mead 2 сар өмнө
parent
commit
f71585d8bd

+ 2 - 2
app/Console/Commands/InitCourseCommand.php

@@ -203,8 +203,8 @@ class InitCourseCommand extends Command
         foreach ($data['Videos'] as $k => $v) {
             $sort = $t - $k;
             $this->line("{$v['name']}==>{$sort}");
-            $aa = Video::query()->whereIn('course_id', $courses)->where('title', $v['name'])->get();
-            dd($aa);
+            Video::query()->whereIn('course_id', $courses)->where('title', $v['name'])->update(['sort' => $sort]);
+//            dd($aa);
         }
 //        }