mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 05:03:13 +00:00
More code for the split journal support.
This commit is contained in:
@@ -57,6 +57,21 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $piggyBankid
|
||||
*
|
||||
* @return PiggyBank
|
||||
*/
|
||||
public function find(int $piggyBankid): PiggyBank
|
||||
{
|
||||
$piggyBank = $this->user->piggyBanks()->where('piggy_banks.id', $piggyBankid)->first(['piggy_banks.*']);
|
||||
if (!is_null($piggyBank)) {
|
||||
return $piggyBank;
|
||||
}
|
||||
|
||||
return new PiggyBank();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user