@php $cart = cart()->getCart(); @endphp @if ($cart) @php $items = $cart->items; @endphp @else @endif