Added the ability to manually add or remove money from piggy banks (issue #6) [skip ci]

This commit is contained in:
James Cole
2014-08-17 08:45:22 +02:00
parent d645a38aec
commit e4f04583a3
10 changed files with 245 additions and 32 deletions

View File

@@ -92,6 +92,14 @@ class Account extends Ardent
return $this->hasMany('Transaction');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function piggybanks()
{
return $this->hasMany('Piggybank');
}
/**
* @param \Carbon\Carbon $date
*

View File

@@ -177,6 +177,8 @@ class Piggybank extends Ardent
/**
* Grabs the PiggyBankRepetition that's currently relevant / active
*
* @returns \PiggybankRepetition
*/
public function currentRelevantRep() {
return $this->piggybankrepetitions()