@extends('layouts.admin.master') @section('head') @section('title')Bargain Book Hut — Authors@endsection @endsection @section('body')
{{-- TOP BAR --}}
Admin › Catalogue › Authors
Total Authors
{{ $Author->total() }}
Active
{{ $activeCount }}
Inactive
{{ $inactiveCount }}
{{-- ── ADD AUTHOR CARD ── --}}

✍️ Add New Author

@include('UI.error')
Comma-separated
{{-- ── AUTHORS TABLE CARD ── --}}
{{-- Search row --}}
{{-- Search --}}
🔍
{{-- Status --}} {{-- Sort --}} @if(request()->hasAny(['search','sort']) || request('status','1') !== '1') ✕ Clear @endif {{ $Author->total() }} {{ $Author->total() == 1 ? 'author' : 'authors' }}
{{-- Table --}}
@forelse($Author as $Authorval) {{-- S/N --}} {{-- PHOTO --}} {{-- AUTHOR DETAILS --}} {{-- BORN --}} {{-- LANGUAGES --}} {{-- ACTIONS --}} @empty @endforelse
# Photo Author Born Languages Actions Status
{{ $loop->iteration }}
@if($Authorval->photo) {{ $Authorval->name }} @else
{{ strtoupper(substr($Authorval->name, 0, 1)) }}
@endif
@if($Authorval->photo) @endif
{{ $Authorval->name }}
@if($Authorval->tagline)
{{ $Authorval->tagline }}
@endif @if($Authorval->bio)
{{ \Illuminate\Support\Str::words($Authorval->bio, 12, '…') }}
@endif
@if($Authorval->born_place)
{{ $Authorval->born_place }}
@endif @if($Authorval->born_year)
{{ $Authorval->born_year }}
@endif @if(!$Authorval->born_place && !$Authorval->born_year) — @endif
@if($Authorval->languages_written) @foreach(explode(',', $Authorval->languages_written) as $lang) {{ trim($lang) }} @endforeach @else — @endif
Comma-separated
status == 1 ? 'checked' : '' }} onchange="updateAuthorStatus({{ $Authorval->id }}, this.checked ? 1 : 0)">
📭

No authors found. Add your first author above.

{{-- Pagination --}} @if($Author->hasPages())
{{ $Author->links() }}
@endif
{{-- Toast --}}
✅ Done
@section('script') @endsection @endsection