@php
$galleries = \App\Models\Gallery::where('status', 1)
->whereHas('galleryAttachments', function($query){
$query->where('status', 1);
})->orderBy('rank', 'ASC')->get();
@endphp
@forelse($galleries as $gallery)
@empty
No galleries found
@endforelse