refactor: replace map with transform for collection formatting in CashAccountService and ExpenseService
This commit is contained in:
parent
a632dd1a67
commit
d82b7f13f2
@ -64,7 +64,7 @@ public function paginatedTransactions(int $perPage = 25, string $search = '', st
|
||||
->orderBy($sort, $direction)
|
||||
->paginate($perPage);
|
||||
|
||||
$paginator->getCollection()->map(fn (CashTransaction $transaction) => $this->formatTransaction($transaction));
|
||||
$paginator->getCollection()->transform(fn (CashTransaction $transaction) => $this->formatTransaction($transaction));
|
||||
|
||||
return $paginator;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public function paginated(int $perPage = 25, string $search = '', string $sort =
|
||||
->orderBy($sort, $direction)
|
||||
->paginate($perPage);
|
||||
|
||||
$paginator->getCollection()->map(fn (Expense $expense) => $this->formatExpense($expense));
|
||||
$paginator->getCollection()->transform(fn (Expense $expense) => $this->formatExpense($expense));
|
||||
|
||||
return $paginator;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user