Browse Source

chapter update

zz 5 năm trước cách đây
mục cha
commit
d9f2e7089b
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/Modules/Book/Services/ChapterService.php

+ 2 - 1
app/Modules/Book/Services/ChapterService.php

@@ -237,7 +237,8 @@ class ChapterService
     public  static function editChapter($chapter){
         $bucket = env('OSS_BUCKET','zhuishuyun');
         $bid = $chapter->bid;
-        $res_db = Chapter::where('id',$chapter->id)->update(['content'=>$chapter->content,'size'=>$chapter->size]);
+        //$res_db = Chapter::where('id',$chapter->id)->update(['content'=>$chapter->content,'size'=>$chapter->size,'name'=>$chapter->name]);
+        $chapter->save();
         //$res_db = true;
         if(self::getChapterFromOss($bid,$chapter->id)){
             $oss = self::ossObject();