@extends('frontend.layouts.app') @section('title', $product->name . ' - SHAOXING SHUOLE TEXTILE CO.,LTD') @section('styles') @endsection @section('content')
{{-- Navigation is already in layout, but this specific ID wrapping might be needed for some CSS/JS --}}

PRODUCTS

+
@php $imgList = []; foreach($product->image_urls as $url) { $imgList[] = ['url' => $url, 'name' => $product->name]; } $jsonImgList = json_encode($imgList); @endphp
    @foreach($product->image_urls as $index => $url)
  • {{ $product->name }}
  • @endforeach

{{ $product->name }}


Category:

Key Word:

{{ $product->category->name ?? 'N/A' }}

@if($product->specifications && is_array($product->specifications))

{{ implode(', ', $product->specifications) }}

@elseif($product->specifications)

{{ $product->specifications }}

@endif

Product description


{!! $product->description !!}

Related products


@php $relatedProducts = \App\Models\Product::where('category_id', $product->category_id) ->where('id', '!=', $product->id) ->inRandomOrder() ->limit(4) ->get(); @endphp @foreach($relatedProducts as $related)
@endforeach
@endsection