@extends('web.home.layout.master') @section('content')
@php $user=Auth::user(); $wishlistData=App\Models\Wishlist::where('user_id',$user->id)->get(); @endphp
@if(count($wishlistData) > 0)
Image
Product
Price
Status
Action
@php $user = Auth::user(); $wishlistData = App\Models\Wishlist::where('user_id',$user->id)->get(); @endphp @foreach ($wishlistData as $data) @php $productData = App\Models\Product::where('id',$data->product_id)->where('status',1)->first(); @endphp
@if($productData) @php $imageArray = explode(',', $productData->product_image); $firstImage = $imageArray[0]; @endphp {{ $productData->product_name }} @else
Product not available
@endif
@if($productData)

{{ $productData->product_name }}

@else

Product not available

@endif
@if($productData) LKR {{ number_format($productData->product_price, 2) }} @else LKR 0.00 @endif
@if($productData) In Stock @else Unavailable @endif
@if($productData) @else @endif
@endforeach
@else

Your wishlist is empty

You don't have any items in your wishlist yet.

Continue Shopping
@endif
@endsection