Add missing method.

This commit is contained in:
James Cole
2023-10-28 18:08:43 +02:00
parent fa31483b02
commit c9fefcd8f4
3 changed files with 17 additions and 2 deletions

View File

@@ -239,6 +239,14 @@ class CurrencyRepository implements CurrencyRepositoryInterface
$currency->save();
}
/**
* @inheritDoc
*/
public function findByName(string $name): ?TransactionCurrency
{
return TransactionCurrency::where('name', $name)->first();
}
/**
* Find by object, ID or code. Returns user default or system default.
*

View File

@@ -84,6 +84,13 @@ interface CurrencyRepositoryInterface
*/
public function findByCode(string $currencyCode): ?TransactionCurrency;
/**
* @param string $name
*
* @return TransactionCurrency|null
*/
public function findByName(string $name): ?TransactionCurrency;
/**
* Find by object, ID or code. Returns user default or system default.
*