From 3854e1d4581b2bca14a30190072fad22ce0aa1b2 Mon Sep 17 00:00:00 2001 From: koogua Date: Wed, 9 Dec 2020 15:31:42 +0800 Subject: [PATCH] =?UTF-8?q?!39=20=E4=BF=AE=E5=A4=8D=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=9C=AA=E8=BF=87=E6=BB=A4=20*=20=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E8=AF=BE=E7=A8=8B=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Services/Course.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/Admin/Services/Course.php b/app/Http/Admin/Services/Course.php index 9dba1d7c..b0f4bfdc 100644 --- a/app/Http/Admin/Services/Course.php +++ b/app/Http/Admin/Services/Course.php @@ -8,6 +8,7 @@ use App\Caches\CourseCategoryList as CourseCategoryListCache; use App\Caches\CourseRelatedList as CourseRelatedListCache; use App\Caches\CourseTeacherList as CourseTeacherListCache; use App\Library\Paginator\Query as PagerQuery; +use App\Models\Category as CategoryModel; use App\Models\Course as CourseModel; use App\Models\CourseCategory as CourseCategoryModel; use App\Models\CourseRating as CourseRatingModel; @@ -224,7 +225,10 @@ class Course extends Service { $categoryRepo = new CategoryRepo(); - $allCategories = $categoryRepo->findAll(['deleted' => 0]); + $allCategories = $categoryRepo->findAll([ + 'type' => CategoryModel::TYPE_COURSE, + 'deleted' => 0, + ]); if ($allCategories->count() == 0) { return [];