@php $admin = auth()->user()->isAdmin(); $foto = $unit->foto; $maks = \App\Http\Controllers\GaleriUnitController::MAKS_FOTO; @endphp {{-- ================= FOTO UNIT ================= --}}
Foto Rumah {{ $foto->count() }}/{{ $maks }} @if($admin && $foto->count() < $maks) @endif
@if($admin)
@csrf
@error('foto')
{{ $message }}
@enderror @foreach($errors->get('foto.*') as $pesan)
{{ $pesan[0] }}
@endforeach
Format JPG/PNG/WebP. Foto besar otomatis diperkecil dan data lokasi (EXIF) dibuang. Foto pertama menjadi sampul unit.
@endif
@if($foto->isEmpty())

Belum ada foto unit ini. @if($admin) Unggah foto tampak depan, interior, atau progres pembangunan rumah.@endif

@else
@foreach($foto as $i => $f)
{{ $f->keterangan ?: 'Foto '.$unit->label }} @if($loop->first) Sampul@endif @if($f->keterangan)
{{ $f->keterangan }}
@endif @if($admin)
@unless($loop->first)
@csrf @method('PUT')
@csrf @method('PUT')
@endunless @unless($loop->last)
@csrf @method('PUT')
@endunless
@csrf @method('DELETE')
@endif
@endforeach
@endif
{{-- ================= LIGHTBOX ================= --}} @if($foto->isNotEmpty()) @endif @if($admin) @endif @push('styles') @endpush @push('scripts') @endpush