@if ($CategoryAttributeSet->count() > 0) @foreach ($CategoryAttributeSet as $k => $atr_set) @endforeach @else @endif
Sr. No. Attribute Set Associated Category Action
{{ $k + 1 + ($CategoryAttributeSet->currentPage() - 1) * $CategoryAttributeSet->perPage() }} @if (!empty($atr_set->title)) {{ $atr_set->title }} @else N/A @endif

@if (!empty($atr_set->linked_categories_details)) @php $sortedCategories = collect($atr_set->linked_categories_details)->sortBy('id'); $categoryCount = count($sortedCategories); // Count the number of categories @endphp
@foreach ($sortedCategories as $index => $linked_category)
    @php $categoryChain = []; $currentCategory = $linked_category; while ($currentCategory) { $categoryChain[] = $currentCategory; $currentCategory = $currentCategory['parent'] ?? null; } usort($categoryChain, fn($a, $b) => $a['id'] <=> $b['id']); $lastCategory = end($categoryChain); @endphp @foreach ($categoryChain as $index => $category)
  • {{ $category['name'] }} @if ($index !== count($categoryChain) - 1) > @endif
  • @endforeach
@endforeach
@if ($categoryCount > 2)
@endif
@else N/A @endif
Add More

No Attributes Set found

You can click on “Create New Attribute” to add

Total Attributes Sets: ({{$CategoryAttributeSet->count()}})
{{ $CategoryAttributeSet->appends(request()->input())->links() }}