@if($section->title || $section->subtitle)
@if($section->subtitle)
{{ $section->subtitle }}
@endif
@if($section->title)
{{ $section->title }}
@endif
@endif
@php
$folderId = $section->getConfig('gallery_folder_id');
$limit = $section->getConfig('image_limit', 12);
$images = \App\Models\Gallery\GalleryImage::when($folderId, function($query) use ($folderId) {
return $query->where('folder_id', $folderId);
})
->active()
->approved()
->public()
->orderBy('sort_order')
->limit($limit)
->get();
@endphp
@foreach($images as $image)
@if($image->title)
{{ $image->title }}
@endif
@if($image->description)
{{ Str::limit($image->description, 60) }}
@endif
@endforeach