@php $xy = 0; $x = 0; $photoall = array(); foreach($photo as $p){ if(isset($p->st)){ if($p->st==0 || $p->st==1){ $photoall[$x]['nu'] = $p->nu; $photoall[$x]['ns'] = $p->ns; $photoall[$x]['na'] = $p->na; $photoall[$x]['sc'] = $p->sc; $photoall[$x]['st'] = $p->st; $photoall[$x]['tx'] = $p->tx; $x++; } } } @endphp

@foreach($photoall as $photo)
{{-- --}}
{{$photo['nu']}} @php if ($photo['ns']!=0){ $color="green"; $style=""; }else{ $color="white"; $style="display: none"; } @endphp
{{$photo['ns']}}
{{-- รูปมุมขวาบน --}}
{{-- รูปมุมขวาบน --}}
       

@endforeach {{-- ท้าย for --}}
@if(count($photoall)>0)

ยืนยันการเลือกรูป
@endif