@extends('layouts.app') @section('content') @php use Illuminate\Support\Carbon; @endphp @php $toggleDirection = fn (string $column) => $sort === $column && $direction === 'asc' ? 'desc' : 'asc'; $sortUrl = fn (string $column) => route('albums.index', array_merge(request()->query(), ['sort' => $column, 'direction' => $toggleDirection($column)])); $sortIndicator = function (string $column) use ($sort, $direction) { if ($sort !== $column) { return '↕'; } return $direction === 'asc' ? '↑' : '↓'; }; @endphp
Collection management

Album listing

Browse, filter, and update the collection using the Secret Chord Analogue brand palette with strong black, white, and yellow contrast.

Add album
Reset
{{ $albums->total() }} album{{ $albums->total() === 1 ? '' : 's' }}
Sorted by {{ ucfirst($sort) }} · {{ strtoupper($direction) }}@if(($lookup ?? '') !== '') · Lookup: {{ $lookup }}@endif
@forelse($albums as $album) @empty @endforelse
Artist {{ $sortIndicator('artist') }} Title {{ $sortIndicator('title') }} Format Location Digitised {{ $sortIndicator('digitised') }} Genre {{ $sortIndicator('genre') }} Decade {{ $sortIndicator('decade') }} Needs Treatment Last treated {{ $sortIndicator('restored') }} Action
{{ $album->artist?->name }}
{{ $album->title }}
@if($album->edition_pressing)
{{ $album->edition_pressing }}
@endif
{{ $album->format_size }} {{ $album->storage_location }} {{ $album->digitised ? 'Yes' : 'No' }} {{ $album->music_genre ?: '—' }} {{ $album->decade_year ? $album->decade_year.'s' : '—' }} {{ $album->needs_treatment ? 'Yes' : 'No' }} {{ $album->last_treated_on ? Carbon::parse($album->last_treated_on)->format('Y-m-d') : '—' }} Edit
No albums matched the current filters.
{{ $albums->links() }}
@endsection