Pārlūkot izejas kodu

排序方式改变

duqinya 5 gadi atpakaļ
vecāks
revīzija
665774c559
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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;
     }