mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add code for budgets
This commit is contained in:
@@ -62,4 +62,17 @@ class SumController extends Controller
|
||||
return response()->json($converted);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateRequest $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function spent(DateRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->spentInPeriod($data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
|
||||
return response()->json($converted);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user