@extends('layouts.app') @section('title', 'Library Catalogue') @section('content')

Library catalogue

Every title, copy count and shelf location. Barcodes are generated per copy.
Export CSV
@include('library._nav')

Books

{{ num($books->total()) }} titles
@forelse($books as $book) @empty @endforelse
TitleAuthorTypeClassCopiesOn loanLocationStatusActions
{{ $book->title }}
{{ $book->isbn ?: $book->serial_no ?: 'โ€”' }}{{ $book->edition ? ' ยท '.$book->edition : '' }}
{{ $book->author }} {{ $book->type }} {{ $book->class_id ? ($classes->firstWhere('id', $book->class_id)?->name ?? 'โ€”') : 'All' }} {{ $book->copies }} {{ $issued[$book->id] ?? 0 }} {{ $book->location ?: 'โ€”' }}
@csrf @method('DELETE')
@include('shared.pager', ['paginator' => $books])
@csrf
@csrf

The first row is treated as a header and skipped.

@foreach($books as $book)
@csrf @method('PUT')
@endforeach @endsection