@php $tab_img=[]; $img_survol=''; $img_default=''; $img_couleur=''; @endphp @if(count($stock->imagedeclinaisons)>0) @foreach($stock->imagedeclinaisons as $img) @php $tab_img[]=$img->image_id @endphp @if($img->defaut==1) @php $img_default=$img->image_id; @endphp @endif @if($img->survol==1) @php $img_survol=$img->image_id; @endphp @endif @if($img->image_couleur==1) @php $img_couleur=$img->image_id; @endphp @endif @endforeach @endif
@foreach($stock->declinaisons as $declinaison) {{$declinaison->attributoption->attribut->name}} {{$declinaison->valeur}} @endforeach
id)}}" class="needs-validation add-product-form" method="POST"> @csrf @method('PUT')
defaut==1) checked @endif type="radio" value="1" name="defaut"> Définir comme déclinaison par défaut

@foreach($stock->produit->images as $image) @php $class="" @endphp @if($img_default==$image->id) @php $class=" image_defaut" @endphp @endif @if($img_survol==$image->id) @php $class=" image_survol" @endphp @endif @if($img_couleur==$image->id) @php $class=" image_couleur" @endphp @endif
id,$tab_img)) {{'checked'}} @endif type="checkbox" id="image_{{$image->id}}" name="combinationimage[]" value="{{$image->id}}">
@endforeach