Merge pull request #1728 from mailpoet/stats-notifications

Stats notifications [ MAILPOET-1571]
This commit is contained in:
M. Shull
2019-01-28 13:22:21 -05:00
committed by GitHub
26 changed files with 1459 additions and 95 deletions

View File

@ -37,6 +37,15 @@ class ScheduledTask extends Model {
);
}
/** @return StatsNotification */
function statsNotification() {
return $this->hasOne(
StatsNotification::class,
'task_id',
'id'
);
}
function pause() {
$this->set('status', self::STATUS_PAUSED);
$this->save();