Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Method to find an account.
James Cole55be17403735
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.phpindex a19cf45840..b0c921b214 100644--- a/app/Repositories/Account/AccountRepository.php+++ b/app/Repositories/Account/AccountRepository.php@@ -643,4 +643,14 @@ class AccountRepository implements AccountRepositoryInterfacereturn $journal;}++ /**+ * @param $accountId+ *+ * @return Account+ */+ public function find($accountId)+ {+ return Auth::user()->accounts()->findOrNew($accountId);+ }}diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.phpindex 86dcb2e616..a3bdd05ec7 100644--- a/app/Repositories/Account/AccountRepositoryInterface.php+++ b/app/Repositories/Account/AccountRepositoryInterface.php@@ -24,6 +24,13 @@ interface AccountRepositoryInterface*/public function countAccounts(array $types);+ /**+ * @param $accountId+ *+ * @return Account+ */+ public function find($accountId);+/*** @param Account $account* @param Account $moveTo