@extends('layouts.app') @section('title', $book->title . ' - Perpustakaan') @section('content')

Detail Buku

@if($book->cover_image) {{ $book->title }} @else
@endif

{{ $book->title }}

by {{ $book->author }}

Penerbit

{{ $book->publisher }}

Tahun diterbitkan

{{ $book->year }}

Kategori

{{ $book->category->name }}

Stok Buku

{{ $book->available_stock }}/{{ $book->total_copies }} available

@if($book->description)

Deskripsi Buku

{{ $book->description }}

@endif
Edit Buku
@csrf @method('DELETE')

Histori Peminjaman

@forelse($book->borrowings()->latest()->limit(10)->get() as $borrowing)

{{ $borrowing->member->name }}

{{ ucfirst($borrowing->status) }}

Borrowed: {{ $borrowing->borrow_date->format('M d, Y') }}

Due: {{ $borrowing->due_date->format('M d, Y') }}

@if($borrowing->return_date)

Returned: {{ $borrowing->return_date->format('M d, Y') }}

@endif
@empty

Tak ada histori peminjaman

@endforelse
@endsection