mead 5 天之前
父节点
当前提交
48aa4bb91a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Repositories/Models/Course/Chapter.php

+ 1 - 1
app/Repositories/Models/Course/Chapter.php

@@ -52,7 +52,7 @@ class Chapter extends Model implements Transformable
             $directory[] = [
                 'id' => $d['id'],
                 'title' => $d['title'],
-                'children' => $d->videos()->where('status', ModelStatusEnum::OK)->where('published_at', '<', Carbon::now()->toDateTimeString())->orderByDesc('sort')->orderBy('published_at')->get(['id', 'title', 'duration', 'short_description'])->append(['duration_text', "progress"])
+                'children' => $d->videos()->where('status', ModelStatusEnum::OK)->where('published_at', '<', Carbon::now()->toDateTimeString())->orderByDesc('sort')->orderByDesc('published_at')->get(['id', 'title', 'duration', 'short_description'])->append(['duration_text', "progress"])
             ];
         }
         return $directory;