gq 7 năm trước cách đây
mục cha
commit
76bb80289a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      server/app/Http/Controllers/Api/V1/IndexController.php

+ 1 - 1
server/app/Http/Controllers/Api/V1/IndexController.php

xqd
@@ -135,7 +135,7 @@ class IndexController extends Controller
             $this->dreams($dreams);
             return $this->api(compact('users','dreams'));
         } elseif ($type == 'news') {
-            $dreams = DreamInfoModel::orderBy('score','desc')->orderBy('created_at','desc')->with('user')->whereNotIn('id', $id_arr2)->limit(500)->toSql();
+            $dreams = DreamInfoModel::orderBy('score','desc')->orderBy('created_at','desc')->with('user')->whereNotIn('id', $id_arr2)->limit(500)->paginate(20);
             $this->dreams($dreams);
             return $this->api(compact('users','dreams'));
         } else{