From edc6edbfda2554c08465a9dea44911126302d8cf Mon Sep 17 00:00:00 2001 From: koogua Date: Mon, 7 Dec 2020 13:37:50 +0800 Subject: [PATCH] =?UTF-8?q?!34=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=AF=BE=E6=97=B6=E7=9B=B8=E5=85=B3=E5=B1=9E=E6=80=A7=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=AA=E7=94=9F=E6=88=90=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20*=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA=E8=AF=BE?= =?UTF-8?q?=E6=97=B6=E7=9B=B8=E5=85=B3=E5=B1=9E=E6=80=A7=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9C=AA=E7=94=9F=E6=88=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Services/Chapter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Admin/Services/Chapter.php b/app/Http/Admin/Services/Chapter.php index de9372e4..5a387d95 100644 --- a/app/Http/Admin/Services/Chapter.php +++ b/app/Http/Admin/Services/Chapter.php @@ -78,6 +78,7 @@ class Chapter extends Service $data['parent_id'] = $parent->id; $data['free'] = $validator->checkFreeStatus($post['free']); $data['priority'] = $chapterRepo->maxLessonPriority($post['parent_id']); + $parentId = $parent->id; } else { $data['priority'] = $chapterRepo->maxChapterPriority($post['course_id']); $data['parent_id'] = $parentId; @@ -120,7 +121,7 @@ class Chapter extends Service } if ($attrs === false) { - throw new \RuntimeException("Create Chapter {$course->model} Attrs Failed"); + throw new \RuntimeException("Create Chapter Related Attrs Failed"); } }