added a check if the task has run yet (#385)

* added a null check on the last_run

* corrected a mistake made when changing the file

* another mistake :/

* changed to be less specific and so it checks against the value instead of >
This commit is contained in:
kasper Franz 2017-04-17 18:03:11 +02:00 committed by Dane Everitt
parent f59e4e0b68
commit 2006920427
3 changed files with 10 additions and 1 deletions

View file

@ -65,7 +65,13 @@
<span class="label label-default">@lang('strings.no')</span>
@endif
</td>
<td class="middle">{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->last_run)->diffForHumans() }})</span></td>
<td class="middle">
@if($task->last_run)
{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->last_run)->diffForHumans() }})</span>
@else
@lang('strings.not_run_yet')
@endif
</td>
<td class="middle">
@if($task->active !== 0)
{{ Carbon::parse($task->next_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->next_run)->diffForHumans() }})</span>