merhaba filtreleme yapıyorum şuan nested layouts fakat ana kategori var parent id alt kategori ile çektirmeye çalışıyorum ama hepsi blrikte geliyor yardımcı olabilir misiniz
<div class="lf-widget">
    <h2>{{ CATEGORIES }}</h2>
    <div id="categoryAccordion">
        @foreach($property_categories as $index => $parentCategory)
            <div class="card">
                <div class="card-header" id="categoryHeading{{ $index }}">
                    <h2 class="mb-0">
                        <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapse{{ $index }}" aria-expanded="true" aria-controls="collapse{{ $index }}">
                            {{ $parentCategory->property_category_name }}
                        </button>
                    </h2>
                </div>
                <div id="collapse{{ $index }}" class="collapse show" aria-labelledby="categoryHeading{{ $index }}" data-parent="#categoryAccordion">
                    <div class="card-body">
                        @if ($parentCategory->childCategories)
                            @if ($parentCategory->childCategories->count() > 0)
                                <ul class="list-unstyled">
                                    @foreach ($parentCategory->childCategories as $childCategory)
                                        <li>
                                            <label>
                                                <input {{ in_array($childCategory->id ,$sort_cat) ? 'checked' : '' }} name="category[]" class="form-check-input ml-1" type="checkbox" value="{{ $childCategory->id }}">
                                                {{ $childCategory->property_category_name }}
                                            </label>
                                        </li>
                                    @endforeach
                                </ul>
                            @else
                                <label>
                                    <input {{ in_array($parentCategory->id ,$sort_cat) ? 'checked' : '' }} name="category[]" class="form-check-input ml-1" type="checkbox" value="{{ $parentCategory->id }}">
                                    {{ $parentCategory->property_category_name }}
                                </label>
                            @endif
                        @endif
                    </div>
                </div>
            </div>
        @endforeach
    </div>
</div>

parent cat konut kategorisinin alt kategorisi