{{-- resources/views/content/website/components/product-card.blade.php Usage: @include('content.website.components.product-card', ['product' => $product, 'newProduct' => $newProduct ?? null]) // or, to always show the New badge regardless of $newProduct (e.g. a "latest wines" rail): @include('content.website.components.product-card', ['product' => $product, 'forceNew' => true]) Expects a real $product model (same one used on the old shop page): $product->slug, $product->name, $product->price, $product->image->name, $product->id Optional fields are guarded with isset()/optional() so the card still renders cleanly if your model doesn't have them yet (region, rating, stock). --}} @isset($product)
@endif
@if ((isset($newProduct) && $newProduct && $newProduct->id === $product->id) || !empty($forceNew))
New
@endif