Reimplemented a routine that creates reminders. Cannot act on them yet.

This commit is contained in:
James Cole
2015-03-06 15:12:07 +01:00
parent f9c518f321
commit fc91a50979
13 changed files with 368 additions and 66 deletions

View File

@@ -14,7 +14,7 @@ class PiggyBank extends Model
{
use SoftDeletes;
protected $fillable = ['repeats', 'name', 'account_id','rep_every', 'rep_times', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder',];
protected $fillable = ['repeats', 'name', 'account_id','rep_every', 'rep_times', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder','remind_me'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
@@ -24,6 +24,15 @@ class PiggyBank extends Model
return $this->belongsTo('FireflyIII\Models\Account');
}
/**
* @param $value
*
* @return int
*/
public function getRemindMeAttribute($value) {
return intval($value) == 1;
}
/**
* Grabs the PiggyBankRepetition that's currently relevant / active
*