Browse Source

Merge pull request #1996 from visuddhinanda/laravel

版本复制包涵content_type
visuddhinanda 2 years ago
parent
commit
cd90a0bcac

+ 1 - 1
app/Http/Controllers/SentInChannelController.php

@@ -52,7 +52,7 @@ class SentInChannelController extends Controller
         }
 
         $table = Sentence::select(['id','book_id','paragraph',
-                                   'word_start','word_end','content',
+                                   'word_start','word_end','content','content_type',
                                    'editor_uid','channel_uid','updated_at'])
                         ->whereIn('channel_uid', $channelsQuery)
                         ->whereIns(['book_id','paragraph','word_start','word_end'],$query);

+ 3 - 0
app/Http/Controllers/SentenceController.php

@@ -276,6 +276,9 @@ class SentenceController extends Controller
                 "uid"=>Str::uuid(),
             ]);
             $row->content = $sent['content'];
+            if(isset($sent['content_type']) && !empty($sent['content_type'])){
+                $row->content_type = $sent['content_type'];
+            }
             $row->strlen = mb_strlen($sent['content'],"UTF-8");
             $row->language = $channel->lang;
             $row->status = $channel->status;