New chart and lots of stuff for piggy banks

This commit is contained in:
James Cole
2014-11-16 10:31:19 +01:00
parent 61aba29df7
commit 2d9c89375a
11 changed files with 284 additions and 19 deletions

View File

@@ -41,4 +41,12 @@ class PiggybankEvent extends Ardent
return $this->belongsTo('Piggybank');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function transactionJournal()
{
return $this->belongsTo('TransactionJournal');
}
}

View File

@@ -138,6 +138,14 @@ class TransactionJournal extends Ardent
return $query->where('date', '>=', $date->format('Y-m-d'));
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function piggybankevents()
{
return $this->hasMany('PiggybankEvent');
}
/**
* @param $query
* @param Carbon $date