@php /** @var array $item @var array $options (item_options for this item) @var array $ingredients (forMenuItem rows) */ $options = $options ?? []; $ingredients = $ingredients ?? []; $layout = $layout ?? 'list'; // 'list' = wide row (default) | 'grid' = .qm-pop-card tile $veg = (int) ($item['is_veg'] ?? 0) === 1; $itemId = (int) $item['id']; $available = (int) ($item['is_available'] ?? 1) === 1; // Menu-only surfaces (e.g. a QR table set to menu_only) render the card with no add-to-cart // affordance; defaults on so every existing caller is unaffected. $ordering = $ordering ?? true; $canAdd = $available && $ordering; // The customize-modal contract (data-* attributes) plus the three values this // card renders from it. One definition, in core/Helpers.php, shared with the // "Popular this week" rail on the restaurant detail page. $modal = menu_item_modal_data($item, $options, $ingredients); $dataAttrs = $modal['attrs']; $groupCount = $modal['groups']; $hasCustomize = $modal['customizable']; $allergenText = $modal['allergens']; @endphp @if ($layout === 'grid') @php // Grid tile: reuses the existing .qm-pop-card style (from the homepage popular // dishes) but carries this page's full item context, so a click opens the same // customize/options modal the list row does - not a one-tap add. No restaurant // tab: we are already on one restaurant. @endphp
@if (!empty($item['is_popular'])){{ t_raw('vendor.menu.popular_pill') }}@endif
{{ $item['description'] }}
@endif{{ t_raw('common.contains_prefix', [':list' => $allergenText]) }}
@endif