mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Expand test coverage and improve transaction management code.
This commit is contained in:
@@ -647,9 +647,13 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
*/
|
||||
public function searchBudget(string $query): Collection
|
||||
{
|
||||
$query = sprintf('%%%s%%', $query);
|
||||
|
||||
return $this->user->budgets()->where('name', 'LIKE', $query)->get();
|
||||
$search = $this->user->budgets();
|
||||
if ('' !== $query) {
|
||||
$search->where('name', 'LIKE', sprintf('%%%s%%', $query));
|
||||
}
|
||||
|
||||
return $search->get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user