Today's Todos ({{ $incomplete_count }})

@foreach ($todos as $todo) @if ($todo->projects->isNotEmpty()) @php $project = $todo->projects->first(); $due = null; if ($todo->due_start && $todo->due_end) { $due = \Carbon\Carbon::parse($todo->due_end); } elseif ($todo->due_start) { $due = \Carbon\Carbon::parse($todo->due_start); } elseif ($todo->due_end) { $due = \Carbon\Carbon::parse($todo->due_end); } $now = now(); $timeRemaining = $due ? ($due->isFuture() ? $now->diffForHumans($due, true) : $due->diffForHumans($now, true)) : null; @endphp
@csrf @method('PUT')
{{ $todo->title }}
@if ($timeRemaining !== null) @if ($due->isFuture())

{{ $timeRemaining }} remaining

@else

{{ $timeRemaining }} ago

@endif @endif
@endif @endforeach
@if($todos->hasMorePages())
Loading...
@else
Congratulations! You've reached the end of the list.
@endif