Wishlist test

This commit is contained in:
merdan 2022-03-29 17:01:05 +05:00
parent 9e786747d4
commit 0b2e1939a6
1 changed files with 1 additions and 2 deletions

View File

@ -221,8 +221,7 @@ class Product extends JsonResource
{
$wishlist = false;
Log::info(auth()->user());
if ($customer = auth()->guard()->user()) {
if ($customer = auth('sanctum')->user()) {
$wishlist = $customer->wishlist_items->filter(function ($item) use ($product) {
return $item->product_id == $product->product_id;
})->first();