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

    <?php
        $numOfImages = count($prodimages);
        $in = 0;
    ?>

    <?php if($numOfImages): ?>
        <?php $__currentLoopData = $prodimages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

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

                    </label>
                </div>
            </div>

            <?php $in++; ?>

        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    <?php endif; ?>  

    <?php
        $numOfImgInptFlds = 4-$numOfImages;
    ?>

    <?php if($numOfImgInptFlds): ?>

        <?php for($i = 1; $i <= $numOfImgInptFlds; $i++): ?>

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

        <?php endfor; ?>

    <?php endif; ?> 

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

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