My ecommerce have many Attributes for filter product . Every Attributes showing with foreach loop . Now I Want to remove filter by color and it's value. How I can Do it.
This Image red circle I want To skip it from loop the site link is https://unikart.com.bd/category/skin
My code is Given below.
@foreach ($attributes as $attribute)
<div class="bg-white shadow-sm rounded mb-3">
<div class="fs-15 fw-600 p-3 border-bottom">
{{ translate('Filter by') }} {{ $attribute->getTranslation('name') }}
</div>
<div class="p-3">
<div class="aiz-checkbox-list others-attributes" id="attribute_list-{{$attribute->id}}" >
@foreach ($attribute->attribute_values as $attribute_value)
<label class="aiz-checkbox">
<input
type="checkbox"
name="selected_attribute_values[]"
value="{{ $attribute_value->value }}" @if (in_array($attribute_value->value, $selected_attribute_values)) checked @endif
onchange="filter()"
>
<span class="aiz-square-check"></span>
<span>{{ $attribute_value->value }}</span>
</label>
@endforeach
</div>
<div class="ViewMore" id="ViewMore-{{$attribute->id}}" onclick="ViewMore({{$attribute->id}})">View More</div>
<div class="ViewLess" id="ViewLess-{{$attribute->id}}" onclick="ViewLess({{$attribute->id}})">View Less</div>
</div>
</div>
@endforeach
You can add filter to attributes on backend
example: $attributes = Attribute::where('type', '!=', 'color')->get();
If you add backend code screenshot, the answer would be clearer.