@extends('layouts.app') @section('title','My Wishlist | Shopora') @section('content')
{{-- Sidebar --}}

Hello,

{{ auth()->user()->name }}

{{-- Main Content --}}

My Wishlist ({{ $items->total() }} items)

@if($items->count())
@foreach($items as $item) @php // Direct Product model ya Wishlist->product relation dono handle karo $product = isset($item->slug) ? $item : ($item->product ?? null); @endphp @if($product && $product->slug)
{{-- Image --}}
@if(!empty($product->images) && is_array($product->images) && count($product->images) > 0) {{ $product->name }} @else @endif {{-- Sale badge --}} @if($product->is_on_sale)
-{{ $product->discount_percent }}%
@endif {{-- Remove from wishlist --}}
@csrf
{{-- Details --}}
{{ $product->name }}
@if($product->is_on_sale)

Rs. {{ number_format($product->price) }}

Rs. {{ number_format($product->sale_price) }}

@else

Rs. {{ number_format($product->price) }}

@endif
@if($product->is_in_stock)
@csrf
@else Out of stock @endif
@endif @endforeach
{{-- Pagination --}}
{{ $items->links() }}
@else {{-- Empty State --}}

Your wishlist is empty

Save items you love and come back to them anytime.

Explore Collection
@endif
@endsection