{{ $type->nameoftype }}
{{ $type->description ?? 'Discover our selection of ' . strtolower($type->nameoftype) }}
@php
$typeProducts = $products->where('product_type_id', $type->id);
@endphp
@if($typeProducts->count() > 0)
@foreach($typeProducts as $product)
@php
// Decide fallback image
$defaultImage = $type->categories === "Drink"
? asset('img/default-drink.png')
: asset('img/default-food.png');
$imagePath = $product->image ? asset($product->image) : $defaultImage;
@endphp
@endforeach
@else
{{ $product->name }}
{{ Str::limit($product->description ?? 'Delicious and refreshing', 60) }}
@if($product->temperature == 1)
@elseif($product->temperature == 2)
@elseif($product->temperature == 3)
@endif
No products available in this category.
@endif