wzq преди 5 години
родител
ревизия
7602dab158
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      app/Repositories/PostRepositories.php

+ 1 - 0
app/Repositories/PostRepositories.php

@@ -548,6 +548,7 @@ class PostRepositories
     {
         $topics = $this->topic
             ->whereIn('id', explode(',',$ids))
+            ->orderByRaw(DB::raw("FIELD(id,{$ids})"))
             ->get();
         $data = [];
         foreach($topics as $topic){