{{-- ================================================================ HEADER ================================================================= --}} {{-- ================================================================ FILTERS ================================================================= --}}
@if ( request('search') || request('status') ) Clear @endif
{{-- ================================================================ TABLE ================================================================= --}}
@if ($books->count())
@foreach ($books as $book) @php $bookInitials = collect( preg_split( '/\s+/', trim($book->title) ) ) ->filter() ->take(2) ->map( fn ($word) => strtoupper( mb_substr( $word, 0, 1 ) ) ) ->implode(''); @endphp {{-- Book --}} {{-- ISBN --}} {{-- Publisher --}} {{-- Category --}} {{-- Status --}} {{-- Rights --}} {{-- Updated --}} {{-- Actions --}} @endforeach
Book ISBN Publisher Category Status Rights Updated
{{ $bookInitials }}
{{ $book->authors->pluck('name')->join(', ') ?: 'No author assigned' }}
{{ $book->isbn }} {{ $book->publisher?->name ?? 'Independent' }} {{ $book->category ?? '—' }}
@if ($book->allow_online_reading) Read @endif @if ($book->allow_print) Print @endif @if ($book->allow_download) Download @endif
{{ $book->updated_at?->format('d M Y') }}
@can('update', $book) @endcan @can('delete', $book)
@csrf @method('DELETE')
@endcan
{{ $books->links() }}
@else

No books found

Add your first book or adjust the current filters.

@can('create', App\Models\Book::class) Add Book @endcan
@endif