Browse Source

项目未关需求列表添加分页

kely 7 months ago
parent
commit
53f1fd4c67
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/API/ProjectController.php

+ 1 - 1
app/Http/Controllers/API/ProjectController.php

@@ -487,7 +487,7 @@ class ProjectController extends Controller
         $project = Project::allowed($id)->findOrFail($id);;
 
         $requirements = $project->assets
-            ? Requirement::query()->whereIn('asset_id', $project->assets?->pluck('id')->toArray())->whereNotIn('id', $project->requirements?->pluck('id')->toArray())->simplePaginate()
+            ? Requirement::query()->whereIn('asset_id', $project->assets?->pluck('id')->toArray())->whereNotIn('id', $project->requirements?->pluck('id')->toArray())->paginate(10)
             : [];
 
         return AssetRequirementResource::collection($requirements);