@php $code = request()->query('id'); @endphp @if($code) @php $gallery = \App\Models\Backend\ContentPhotoGallery::with('translations') ->where('gallery_code', $code) ->where('gallery_status', 'ACTIVE') ->first(); @endphp @if($gallery) @php $gt = $gallery->translations->firstWhere('gallery_translation_language', $lang) ?? $gallery->translations->first(); $photos = \App\Models\Backend\ContentPhotoList::where('photo_gallery_id', $gallery->gallery_id) ->where(function ($q) { $q->whereNull('photo_main')->orWhere('photo_main', '1'); }) ->orderBy('photo_sort') ->orderBy('photo_id') ->get(); $photoTrans = \App\Models\Backend\ContentPhotoList::where('photo_gallery_id', $gallery->gallery_id) ->where('photo_language', $lang) ->whereNotNull('photo_parent_id') ->pluck('photo_descr', 'photo_parent_id'); @endphp
Utama / Galeri / {{ $gt?->gallery_translation_title ?? $gallery->gallery_code }}

{{ $gt?->gallery_translation_title ?? 'Galeri' }}

@if($gt?->gallery_translation_descr)

{{ $gt->gallery_translation_descr }}

@endif

{{ $photos->count() }} gambar

@if($photos->count())
@foreach($photos as $p) @php $cap = $photoTrans[$p->photo_id] ?? $p->photo_descr; @endphp
{{ $cap }} @if($cap)
{{ $cap }}
@endif
@endforeach
@else

Tiada gambar dalam galeri ini.

@endif
@else

Galeri tidak ditemui

Maaf, galeri yang anda cari tidak wujud atau telah dialihkan.

Kembali ke Galeri
@endif @else @php $items = \App\Models\Backend\ContentPhotoGallery::with(['translations' => function($q) use ($lang) { $q->where('gallery_translation_language', $lang); }])->where('gallery_status', 'ACTIVE')->orderBy('gallery_date', 'desc')->get(); @endphp @if($items->count())
Galeri

Galeri Foto

Koleksi gambar dan foto-foto rasmi.

@else

Tiada Galeri

Tiada galeri foto buat masa ini.

Kembali
@endif @endif