wesley.chen %!s(int64=7) %!d(string=hai) anos
pai
achega
044c81f287
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Http/Controllers/Api/V1/HomeController.php

+ 2 - 2
app/Http/Controllers/Api/V1/HomeController.php

xqd
@@ -470,9 +470,9 @@ class HomeController extends Controller
 
 
             if ($province == "全部省份") {
-                $major = MajorInfoModel::where('year', $year)->where('batch', $batch)->where('class', $class)->where('min_grade', "<=", $grade)->get();
+                $major = MajorInfoModel::where('year', $year)->where('batch', $batch)->where('class', $class)->where('min_grade', "<=", $grade)->paginate(10);
             } else {
-                $major = MajorInfoModel::where('year', $year)->where('batch', $batch)->where('class', $class)->where('province', 'like', '%' . $province . '%')->where('min_grade', "<=", $grade)->get();
+                $major = MajorInfoModel::where('year', $year)->where('batch', $batch)->where('class', $class)->where('province', 'like', '%' . $province . '%')->where('min_grade', "<=", $grade)->paginate(10);
             }
 
             $count = count($major);