@extends('layouts.app') @section('title', 'Active Loans | Library') @section('sidebar-menu') @include('schooladmin.partials.sidebar') @endsection @section('sidebar-footer')

{{ auth()->user()->school?->name ?? 'Institution Axis' }}

@endsection @section('breadcrumb') Home / Library / Loans @endsection @section('navbar-right')
5
@endsection @section('content')

Borrowing & Returns

Track all issued and returned books
Issue Book
@foreach(['success', 'error', 'warning'] as $msg) @if(session($msg))
{{ session($msg) }}
@endif @endforeach
Loan Records
@forelse($loans as $loan) @empty @endforelse
# Book Borrower Borrowed On Due Date Returned On Status Actions
{{ $loop->iteration }} {{ $loan->book->title }} {{ $loan->user->name }} {{ $loan->borrowed_at->format('d M Y') }} {{ $loan->due_date->format('d M Y') }} {{ $loan->returned_at ? $loan->returned_at->format('d M Y') : '—' }} @if($loan->status === 'returned') Returned @elseif(now()->gt($loan->due_date)) Overdue @else Active @endif @if($loan->status !== 'returned')
@csrf
@else Done @endif
No loan records yet.
@if($loans->hasPages()) @endif
@endsection @section('custom-scripts') @endsection