More code for the split journal support.

This commit is contained in:
James Cole
2016-05-17 15:19:07 +02:00
parent e113736887
commit 495b80f5ef
13 changed files with 612 additions and 11 deletions

View File

@@ -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
*