@extends('admin.layouts.master') @section('title', 'Shared Memories') @section('content') @include('admin.partials.page-header', [ 'title' => 'Shared Memories — '.$funeral->f_name, 'crumbs' => [ ['label' => 'Memorials', 'url' => route('admin.funeral.index')], ['label' => 'Shared Memories'], ], ])
@if ($memories->isEmpty())
No shared memories found
@else
@foreach ($memories as $index => $memory) @php $firstImage = $memory->images->first(); $photoCount = $memory->images->count(); $thumbUrl = $firstImage && $firstImage->si_image ? asset('uploads/share_memory/'.$memory->s_id.'/'.$firstImage->si_image) : null; @endphp @endforeach
Id Name Memory Photos Date Current Status Action
{{ $index + 1 }} {{ $memory->user?->user_name ?: '-' }} {{ trim((string) $memory->s_memory) !== '' ? $memory->s_memory : 'Photo share' }} @if ($thumbUrl) Shared photo @if ($photoCount > 1)
+{{ $photoCount - 1 }} more
@endif @else — @endif
{{ $memory->s_date ? date('m-d-Y', strtotime($memory->s_date)) : '-' }} @if ($photoCount > 0) {{ $photoCount }} @endif
@endif
@foreach ($memories as $memory) @endforeach @endsection @push('scripts') @if ($memories->isNotEmpty()) @endif @endpush