@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)|
{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }} @if ($statusLpj || file_exists($imagePath)){{ $item['description'] }} @endisset |
@else
@foreach ($subPhotos as $index => $item)
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }} @if ($statusLpj || file_exists($imagePath)){{ $item['description'] }} @endisset |
@if (($index + 1) % 2 == 0)
|
| @endif @endif | ||
|
{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }} @if ($statusLpj || file_exists($imagePath)){{ $item['description'] }} @endisset |
@else
@foreach ($subPhotos as $index => $item)
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
{{ $category }} - @isset($subcategory) @if (trim($subcategory) !== '') {{ $subcategory }} - @endif @endisset {{ $item['name'] ?? '' }} @if ($statusLpj || file_exists($imagePath)){{ $item['description'] }} @endisset |
@if (($index + 1) % 2 == 0)
|
| @endif @endif | ||