Various code cleanup and fixed alignments.

This commit is contained in:
James Cole
2024-01-01 14:42:24 +01:00
parent 657262f179
commit 1368aafe5f
23 changed files with 169 additions and 169 deletions

View File

@@ -52,9 +52,9 @@ class IndexController extends Controller
*/
public function index(Budget $budget): JsonResponse
{
$pageSize = $this->parameters->get('limit');
$collection = $this->repository->getBudgetLimits($budget);
$total = $collection->count();
$pageSize = $this->parameters->get('limit');
$collection = $this->repository->getBudgetLimits($budget);
$total = $collection->count();
$collection->slice($pageSize * $this->parameters->get('page'), $pageSize);
$paginator = new LengthAwarePaginator($collection, $total, $pageSize, $this->parameters->get('page'));