@foreach($types as $type)
@php $typeProducts = $products->where('product_type_id', $type->id); @endphp @if($typeProducts->count() > 0) @foreach($typeProducts as $product)
{{ $product->name }}

{{ $product->name }}

@if(strpos($product->temperature, 'hot') !== false) @endif @if(strpos($product->temperature, 'cold') !== false || strpos($product->temperature, 'ice') !== false) @endif
@endforeach @else

No products available in this category.

@endif
@endforeach