mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Add missing method to repository.
This commit is contained in:
		| @@ -38,6 +38,16 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf | ||||
| { | ||||
|     use UserGroupTrait; | ||||
| 
 | ||||
|     public function searchCurrency(string $search, int $limit): Collection | ||||
|     { | ||||
|         $query = TransactionCurrency::where('enabled', true); | ||||
|         if ('' !== $search) { | ||||
|             $query->whereLike('name', sprintf('%%%s%%', $search)); | ||||
|         } | ||||
| 
 | ||||
|         return $query->take($limit)->get(); | ||||
|     } | ||||
| 
 | ||||
|     #[\Override]
 | ||||
|     public function find(int $currencyId): ?TransactionCurrency | ||||
|     { | ||||
|   | ||||
| @@ -34,6 +34,7 @@ use Illuminate\Support\Collection; | ||||
| interface CurrencyRepositoryInterface | ||||
| { | ||||
|     public function find(int $currencyId): ?TransactionCurrency; | ||||
|     public function searchCurrency(string $search, int $limit): Collection; | ||||
| 
 | ||||
|     /** | ||||
|      * Find by currency code, return NULL if unfound. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user