Skip to content

Commit

Permalink
manual count
Browse files Browse the repository at this point in the history
xlcrr committed Mar 30, 2024
1 parent 562ab2e commit 90be577
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -63,14 +63,17 @@ public function __invoke (Request $request): JsonResponse
$q->whereNotIn('tag', $notInclude);
});

$count = $query->count();

$photos = $query->whereHas('customTags')
->with('customTags')
->orderBy('id', 'desc')
->paginate($request->paginationAmount);

return response()->json([
'success' => true,
'photos' => $photos
'photos' => $photos,
'count' => $count
]);
}
}

0 comments on commit 90be577

Please sign in to comment.