@php $cart = null; if (session()->has('cart_identifier')) { $cart = \App\Models\Cart::where('cart_identifier', session()->get('cart_identifier'))->first(); } $cartItems = $cart ? $cart ->cartItems() ->with('product') ->get() : []; @endphp
@push('scripts') @endpush