mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-08 05:43:01 +00:00
Method to find an account.
This commit is contained in:
@@ -643,4 +643,14 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
|
|
||||||
return $journal;
|
return $journal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $accountId
|
||||||
|
*
|
||||||
|
* @return Account
|
||||||
|
*/
|
||||||
|
public function find($accountId)
|
||||||
|
{
|
||||||
|
return Auth::user()->accounts()->findOrNew($accountId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,13 @@ interface AccountRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function countAccounts(array $types);
|
public function countAccounts(array $types);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $accountId
|
||||||
|
*
|
||||||
|
* @return Account
|
||||||
|
*/
|
||||||
|
public function find($accountId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param Account $moveTo
|
* @param Account $moveTo
|
||||||
|
Reference in New Issue
Block a user