@extends('public.layout.app') @section('body')
{{-- Breadcrumb --}}
{{-- Header / Cover --}} @php $cover = $gallery->cover_image ? asset('storage/'.$gallery->cover_image) : null; if(!$cover && $gallery->relationLoaded('images')){ $first = $gallery->images->first(); $cover = $first? asset('storage/'.$first->path) : null; } @endphp
@if($cover) {{ $gallery->title }} @else
@endif

{{ $gallery->title }}

{{ optional($gallery->created_at)->format('M d, Y') }} @if($gallery->author) {{ $gallery->author->name }} @endif
@if($gallery->description)
{!! nl2br(e($gallery->description)) !!}
@endif
{{-- Images Grid (if you have images relation) --}} @if($gallery->relationLoaded('images') && $gallery->images->count())
{{ __('front.photos') }}
{{ $gallery->images->count() }} items
@foreach($gallery->images as $img) @endforeach
@endif
@endsection