mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Move method to correct repository.
This commit is contained in:
@@ -209,29 +209,6 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns all available budget objects.
|
||||
*
|
||||
* @param Carbon|null $start
|
||||
* @param Carbon|null $end
|
||||
*
|
||||
* @return Collection
|
||||
*
|
||||
*/
|
||||
public function getAvailableBudgetsByDate(?Carbon $start, ?Carbon $end): Collection
|
||||
{
|
||||
$query = $this->user->availableBudgets();
|
||||
|
||||
if (null !== $start) {
|
||||
$query->where('start_date', '>=', $start->format('Y-m-d H:i:s'));
|
||||
}
|
||||
if (null !== $end) {
|
||||
$query->where('end_date', '<=', $end->format('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param Carbon $start
|
||||
|
Reference in New Issue
Block a user