@php
$drinkTypes = collect($types)->where('categories', 'Drink');
$firstDrink = true;
@endphp
@foreach($drinkTypes as $type)
@php $firstDrinkSection = true; @endphp
@foreach($drinkTypes as $type)
{{ $type->nameoftype }}
@php $firstDrink = false; @endphp
@endforeach
@php
$typeProducts = collect($products)->where('product_type_id', $type->id);
@endphp
@if($typeProducts->count() > 0)
@foreach($typeProducts as $product)
@php
$defaultImage = asset('img/default-drink.png');
$imagePath = $product->image ? asset($product->image) : $defaultImage;
@endphp
@endforeach
@else
{{ $type->nameoftype }}
{{ $product->name }}
{{ Str::limit($product->description ?? 'Delicious and refreshing', 60) }}
RM {{ number_format($product->unitPrice, 2) }}
@if($product->temperature)
@if($product->temperature == 2 || $product->temperature == 3)
@endif
@if($product->temperature == 1 || $product->temperature == 3)
@endif
@endif
No products available in this category.
@endif
@php
$foodTypes = collect($types)->where('categories', 'Food');
$firstFood = true;
@endphp
@foreach($foodTypes as $type)
@php $firstFoodSection = true; @endphp
@foreach($foodTypes as $type)
{{ $type->nameoftype }}
@php $firstFood = false; @endphp
@endforeach
@php
$typeProducts = collect($products)->where('product_type_id', $type->id);
@endphp
@if($typeProducts->count() > 0)
@foreach($typeProducts as $product)
@php
$defaultImage = asset('img/default-food.png');
$imagePath = $product->image ? asset($product->image) : $defaultImage;
@endphp
@endforeach
@else
{{ $type->nameoftype }}
{{ $product->name }}
{{ Str::limit($product->description ?? 'Delicious and satisfying', 60) }}
RM {{ number_format($product->unitPrice, 2) }}
No products available in this category.
@endif