@extends('welcome') @section('content')
{{ $famille->getTranslatedAttribute('nom_famille', app()->getLocale()) }}

{{ $myproduit->getTranslatedAttribute('nom_famille', app()->getLocale()) }}

@php $images = json_decode($myproduit->image, true); @endphp @if (is_array($images) && count($images) > 0) @if (count($images) > 1)
@foreach ($images as $image)
{{ $myproduit->nom }}
@endforeach
@foreach ($images as $image)
{{ $myproduit->nom }}
@endforeach
@else {{ $myproduit->nom }} @endif @else Image par défaut @endif

{{ $myproduit->getTranslatedAttribute('nom', app()->getLocale()) }}

{!! $myproduit->getTranslatedAttribute('description', app()->getLocale()) !!}

@php $pdfData = json_decode($myproduit->pdf, true); $pdfPath = $pdfData[0]['download_link'] ?? null; @endphp @if ($pdfPath) {{-- Visualiser PDF --}} {{-- --}} {{-- {{ __('icons.pdf') }} --}} Télécharger le PDF @endif

{{ __('icons.autre') }}

@if ($produits->count() < 3) {{--

Il y a moins de trois produits disponibles.

--}}
@foreach ($produits as $produit)
@php $images = json_decode($produit->image, true); @endphp
{{ $produit->getTranslatedAttribute('nom', app()->getLocale(), 'fr') }}

{!! \Illuminate\Support\Str::limit($produit->getTranslatedAttribute('description', app()->getLocale()), 100) !!}

{{ __('icons.voir') }}
@endforeach
@else
@foreach ($produits as $produit) @endforeach
@endif
@endsection