@lang('Filters')
@lang('Price range')
@if(isset($category))
@lang('Brands')
@foreach($category->all_products()->unique('brand_id') as $product) @if($product->brand)
{{$product->brand->name}}
@endif @endforeach
@elseif(isset($brand))
@lang('Categories')
@foreach($brand->products()->distinct()->get(['category_id']) as $product) @if($product->category)
{{$product->category->name}}
@endif @endforeach
@else
@lang('Categories')
@foreach($products as $product) @if($product->category) @if(!in_array($product->category->name, $dataCategories))
{{$product->category->name}}
@endif @endif @endforeach
@lang('Brands')
@foreach($products as $product) @if($product->brand) @if(!in_array($product->brand->name, $dataBrands))
{{$product->brand->name}}
@endif @endif @endforeach
@endif @if(isset($category)) @foreach($category->specificationTypes as $specificationType)
{{$specificationType->name}}
@foreach($products as $product) @if($product->specificationTypes->contains($specificationType->id)) @foreach($product->specificationTypes as $productSpecificationType) @if($productSpecificationType->id == $specificationType->id) @if(isset($productSpecificationType->pivot->value)) @if(!in_array($value_unit, $data))
{{$productSpecificationType->pivot->value}} {{$productSpecificationType->pivot->unit}}
@endif @endif @endif @endforeach @endif @endforeach
@endforeach @endif