@forelse ($products as $product)
@php $thumbnail = json_decode($product->thumbnail, true); @endphp

{{ $product->name }}

@php $sellingPrice = $product->selling_price; $discountPrice = $product->discount_price; $finalPrice = $sellingPrice - $discountPrice; $formattedPrice = number_format($finalPrice, 2); @endphp @if ($product->discount_price > 0 && $product->selling_price > $product->discount_price) ৳ {{ number_format($product->selling_price, 2) }} ৳ {{ $formattedPrice }} {{-- {{ number_format($product->selling_price - $product->discount_price, 2) }} --}} @else ৳ {{-- {{ $formattedPrice }} --}} {{ number_format($product->selling_price, 2) }} @endif
@empty @endforelse
{{ $products->links('vendor.pagination.bootstrap-5') }}