@php
$selectedAttrs = json_decode($data->attributes, true);
@endphp
{{-- Attributes of category starts --}}
@php
$catAttributes = !empty($data->category->attributes) ? $data->category->attributes : '';
@endphp
@if (!empty($catAttributes))
@foreach ($catAttributes as $catAttribute)
@php
$i = 0;
@endphp
@foreach ($catAttribute->attribute_options as $optionKey => $option)
@php
$inName = $catAttribute->input_name;
$checked = 0;
@endphp
@php
if ($checked == 1) {
$i++;
}
@endphp
@endforeach
@endforeach
@endif
{{-- Attributes of category ends --}}
{{-- Attributes of subcategory starts --}}
@php
$subAttributes = !empty($data->subcategory->attributes)
? $data->subcategory->attributes
: '';
@endphp
@if (!empty($subAttributes))
@foreach ($subAttributes as $subAttribute)
@php
$i = 0;
@endphp
@foreach ($subAttribute->attribute_options as $optionKey => $option)
@php
$inName = $subAttribute->input_name;
$checked = 0;
@endphp
@php
if ($checked == 1) {
$i++;
}
@endphp
@endforeach
@endforeach
@endif
{{-- Attributes of subcategory ends --}}
{{-- Attributes of child category starts --}}
@php
$childAttributes = !empty($data->childcategory->attributes)
? $data->childcategory->attributes
: '';
@endphp
@if (!empty($childAttributes))
@foreach ($childAttributes as $childAttribute)
@php
$i = 0;
@endphp
@foreach ($childAttribute->attribute_options as $optionKey => $option)
@php
$inName = $childAttribute->input_name;
$checked = 0;
@endphp
@php
if ($checked == 1) {
$i++;
}
@endphp
@endforeach
@endforeach
@endif
{{-- Attributes of child category ends --}}