浏览代码

排序方式改变

duqinya 5 年之前
父节点
当前提交
665774c559
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Repositories/StarNewsRepository.php

+ 1 - 1
app/Repositories/StarNewsRepository.php

@@ -24,7 +24,7 @@ class StarNewsRepository
                 ->where('id',$request['id'])->orderBy('id', 'desc')->first();
         }
         $this->starNews = $this->starNews
-            ->orderBy('id', 'desc')->get();
+            ->where('status',1)->orderBy('sort', 'asc')->get();
 
         return $this->starNews;
     }