Skip to content

Commit

Permalink
fix for wrong value in in list commands
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Mar 2, 2017
1 parent e4bc6a6 commit cc713ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-server-monitor` will be documented in this file

## 1.0.1 - 2017-03-02

- fix for wrong value in `Next run` in list commands

## 1.0.0 - 2017-03-02

- initial release
6 changes: 5 additions & 1 deletion src/Models/Presenters/CheckPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function getNextRunDiffAttribute(): string
return 'As soon as possible';
}

return Carbon::now()->addMinutes($this->next_run_in_minutes)->diffForHumans();
if (! $this->last_ran_at) {
return 'As soon as possible';
}

return Carbon::now()->addMinutes($this->last_ran_at)->diffForHumans();
}
}

0 comments on commit cc713ad

Please sign in to comment.