{{-- resources/views/todo/index.blade.php --}} @extends('layouts.app') @section('title', 'Todo List') @section('css') @endsection @section('content')

Todo List

{{ $todos->total() }}

Total Todos

{{ $todos->where('completed', true)->count() }}

Completed

{{ $todos->where('completed', false)->count() }}

Pending

{{ $todos->first() ? $todos->first()->created->diffForHumans() : 'N/A' }}

Latest Todo

Your Todos

@forelse($todos as $todo)
completed ? 'checked' : '' }} style="width: 20px; height: 20px;">
{{ $todo->text }}
Created: {{ $todo->created->format('M d, Y H:i') }} UUID: {{ substr($todo->uuid, 0, 8) }}...
{{ $todo->completed ? 'Completed' : 'Pending' }}
@empty

No todos yet. Create your first todo!

Create Todo
@endforelse
@endsection @section('javascripts') @endsection