@isset($basicData['foto']) @php $photos = $formFoto['upload_foto'] ?? []; if (!is_array($photos)) { $photos = []; } $groupedPhotos = collect($photos)->groupBy('category'); $mainPhotos = $groupedPhotos->filter(fn($_, $key) => strtolower($key) !== 'lainnya'); $otherPhotos = $groupedPhotos->get('lainnya', collect()); @endphp @if ($groupedPhotos->isEmpty())

Tidak ada foto yang tersedia.

@else @foreach ($mainPhotos as $category => $photos) @php $groupedBySubcategory = $photos->groupBy('sub'); @endphp @foreach ($groupedBySubcategory as $subcategory => $subPhotos) @if (count($subPhotos) > 0) @if (count($subPhotos) === 1) @php $item = $subPhotos->first(); $imagePath = storage_path('app/public/' . $item['path']); @endphp @else @foreach ($subPhotos as $index => $item) @php $imagePath = storage_path('app/public/' . $item['path']); @endphp @if (($index + 1) % 2 == 0) @endif @endforeach @if (count($subPhotos) % 2 != 0) @endif @endif

{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }}

@if ($statusLpj || file_exists($imagePath)) {{ $item['path'] }} @endif @isset($item['description'])

{{ $item['description'] }}

@endisset

{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }}

@if ($statusLpj || file_exists($imagePath)) {{ $item['path'] }} @endif @isset($item['description'])

{{ $item['description'] }}

@endisset
@endif @endforeach @endforeach @endif
@if (!$otherPhotos->isEmpty()) @foreach ($otherPhotos->groupBy('sub') as $subcategory => $subPhotos) @if (count($subPhotos) > 0) @if (count($subPhotos) === 1) @php $item = $subPhotos->first(); $imagePath = storage_path('app/public/' . $item['path']); @endphp @else @foreach ($subPhotos as $index => $item) @php $imagePath = storage_path('app/public/' . $item['path']); @endphp @if (($index + 1) % 2 == 0) @endif @endforeach @if (count($subPhotos) % 2 != 0) @endif @endif

{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }}

@if ($statusLpj || file_exists($imagePath)) {{ $item['path'] }} @endif @isset($item['description'])

{{ $item['description'] }}

@endisset

{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }}

@if ($statusLpj || file_exists($imagePath)) {{ $item['path'] }} @endif @isset($item['description'])

{{ $item['description'] }}

@endisset
@endif @endforeach @endif @endisset