@php
$products = DB::table('products')
->join('product_prices', 'products.id', '=', 'product_prices.product_id')
->where('products.id_category', $category->id)
->where('products.flag_highlight', 'YES')
->orderBy('products.created_at', 'desc')
->take(8) // Apenas 8 produtos
->get();
@endphp
@foreach ($products as $product)
@php
$images = json_decode($product->images);
$firstImage = reset($images);
$imageUrl = "http://187.62.80.20:8001/
{$firstImage}";
$colors = json_decode($product->colors);
@endphp
@for ($i = 0; $i < 5; $i++)
@endfor
{{ $product->name }}
R$ {{ $product->price_7_days }}
@foreach ($colors as $color)
@endforeach
@endforeach