mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 08:30:06 +00:00
Expand autocomplete and remove old code #3150
This commit is contained in:
@@ -63,9 +63,10 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* Search in journal descriptions.
|
||||
*
|
||||
* @param string $search
|
||||
* @param int $limit
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchJournalDescriptions(string $search): Collection
|
||||
public function searchJournalDescriptions(string $search, int $limit): Collection
|
||||
{
|
||||
$query = $this->user->transactionJournals()
|
||||
->orderBy('date', 'DESC');
|
||||
@@ -73,7 +74,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
$query->where('description', 'LIKE', sprintf('%%%s%%', $search));
|
||||
}
|
||||
|
||||
return $query->get();
|
||||
return $query->take($limit)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user