Books {{-- Stats --}}

Total Books

{{ $totalBooks }}

Total Chapters

{{ \App\Models\Chapter::count() }}

Total Words

{{ number_format(\App\Models\Chapter::sum('word_count')) }}

{{-- Search --}}
@if(request('search')) Clear @endif
{{-- Books grouped by user --}} @forelse($users as $user)
{{-- User header --}}
{{ strtoupper(substr($user->name, 0, 1)) }}
{{ $user->name }}

{{ $user->email }}

{{ $user->books_count }} {{ Str::plural('book', $user->books_count) }}
{{-- Books table --}}
@foreach($user->books as $book) @endforeach
Book Chapters Status Created Actions
@if($book->cover_image) @else
@endif

{{ $book->title }}

@if($book->description)

{{ Str::limit($book->description, 60) }}

@endif
{{ $book->chapters_count }} {{ ucfirst(str_replace('_', ' ', $book->status)) }} {{ $book->created_at->format('M d, Y') }}
@empty
@if(request('search')) No books found matching "{{ request('search') }}" @else No books yet @endif
@endforelse {{-- Pagination --}} @if($users->hasPages())
{{ $users->withQueryString()->links() }}
@endif