mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Search improvements.
This commit is contained in:
@@ -635,6 +635,20 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchBudget(string $query): Collection
|
||||
{
|
||||
$query = sprintf('%%%s%%', $query);
|
||||
|
||||
return $this->user->budgets()->where('name', 'LIKE', $query)->get();
|
||||
}
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $currency
|
||||
* @param Carbon $start
|
||||
@@ -662,8 +676,6 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
return $availableBudget;
|
||||
}
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param int $order
|
||||
@@ -903,6 +915,8 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
return $limit;
|
||||
}
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
|
||||
/**
|
||||
* @param Budget $budget
|
||||
* @param array $data
|
||||
@@ -922,8 +936,6 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
return $budget;
|
||||
}
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
|
||||
/**
|
||||
* @param AvailableBudget $availableBudget
|
||||
* @param array $data
|
||||
|
@@ -169,8 +169,6 @@ interface BudgetRepositoryInterface
|
||||
*/
|
||||
public function getBudgets(): Collection;
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
|
||||
/**
|
||||
* Get all budgets with these ID's.
|
||||
*
|
||||
@@ -180,6 +178,8 @@ interface BudgetRepositoryInterface
|
||||
*/
|
||||
public function getByIds(array $budgetIds): Collection;
|
||||
|
||||
/** @noinspection MoreThanThreeArgumentsInspection */
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
@@ -194,6 +194,13 @@ interface BudgetRepositoryInterface
|
||||
*/
|
||||
public function getNoBudgetPeriodReport(Collection $accounts, Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchBudget(string $query): Collection;
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $currency
|
||||
* @param Carbon $start
|
||||
|
Reference in New Issue
Block a user