zhangchangchun 5 gadi atpakaļ
vecāks
revīzija
d7fc719fc3
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 7 1
      app/Repositories/TopicRepository.php

+ 7 - 1
app/Repositories/TopicRepository.php

@@ -44,7 +44,13 @@ class TopicRepository {
             }
         }
 
-        return $this->topic->where($where)->orderBy('id','desc')->paginate($perPage);
+        return $this->topic
+            ->where($where)
+            ->orderBy('is_hot','desc')
+            ->orderBy('is_suggest','desc')
+            ->orderBy('is_open','desc')
+            ->orderBy('id','desc')
+            ->paginate($perPage);
     }
     //新增
     public function create($request){