@php $pn=''; $productName = $product->articleInfo->short_desc; //$slug = $product->url; $purl = route('front.shop.shop-product-details', ['code' => $product->article, 'color' => $product->color,'pid' => $product->id]); $purl = str_replace('#', '__hash__', $purl); $IMG_article = str_replace('#', '', $product->article); $col_name = str_replace(' ', '_', $product->color); $articleimg = \App\ArticleImg::where('code',$IMG_article)->where('color_name',$col_name)->orderBy('sort_order')->first(); if(empty($articleimg)){ $articleimg = \App\ArticleImg::where('code',$IMG_article)->where('color_name',$product->color)->orderBy('sort_order')->first(); } //dd($articleimg); $images = empty($articleimg->imgname) || $articleimg->imgname == 'NULL' ? asset('front-shop/images/placeholder.png') : asset('/uploads/articles/photos/full/'.$articleimg->imgname); @endphp