wellknow ss

This commit is contained in:
merdan 2022-09-01 15:06:29 +05:00
parent 93b8bbe8fa
commit 7a4bb61997
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -66,7 +66,7 @@ class ProductFlat extends Model implements ProductFlatContract
'id' => $this->id,
'sku' => $this->sku,
'name' => $this->name,
'meta_title' => $this->meta_title,
// 'meta_title' => $this->meta_title,
'meta_keywords' => $this->meta_keywords,
];
}