<div class="row" id="imagesinput">

    @php
        $numOfImages = count($prodimages);
        $in = 0;
    @endphp

    @if($numOfImages)
        @foreach($prodimages as $img)

            <div class="form-group col-md-3 imgb iold">
                <div class="imgprew"><img src="/{{$img->prod_mimg}}"></div>
                <div class="idbh text-center">
                    <button data-prodid="{{$img->prod_id}}" data-imgid="{{$img->prod_img_id}}" class="btn btn-danger btn-xs delimg" type="button">{{__('adminforms.common.del_btn')}}</button>
                </div>
                <div class="irbh text-center">
                    <label>
                        <input type="radio" class="dic" name="defaultimg" value="{{$img->prod_id.'-'.$img->prod_img_id}}" id="defaultimg_{{$in}}"  {!! ($img->prod_def_img == 1)  ? ' checked="checked" ' : '' !!} />
                        {{__('adminforms.products.def_image')}}
                    </label>
                </div>
            </div>

            @php $in++; @endphp

        @endforeach

    @endif  {{--if numOfImages--}}

    @php
        $numOfImgInptFlds = 4-$numOfImages;
    @endphp

    @if($numOfImgInptFlds)

        @for ($i = 1; $i <= $numOfImgInptFlds; $i++)

            <div class="form-group col-md-3 imgb">
                <div class="imgprew"><img src="{{asset('assets/img/admin-image-placeholder.jpg')}}"></div>
                <input type="file" value="" name="images[]" class="filestyle input-sm imginput" data-icon="false" data-buttonText="{{__('adminforms.products.select_img')}}">
            </div>

        @endfor

    @endif {{--if numOfImgInptFlds--}}

    <input id="imgres" name="imgres" type="hidden" value="" />

</div><!-- /.row #imagesinput -->