<div class="category-thumbanial">
    <div class="container box-sh py-2">
        <div class="row" style="text-align: center;">
            <?php $__currentLoopData = $collections; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $collection): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="category-item  col-md-3 col-sm-3 col-6">
                    <div class="item-in">
                        <div class="thumbnail">
                            <a href="<?php echo e(route('collection.product', $collection->slug)); ?>">
                                <img src="<?php if(file_exists(public_path() . '/uploads/collection/' . $collection->cover_photo)): ?><?php echo e(asset('uploads/collection/' . $collection->cover_photo)); ?><?php else: ?><?php echo e(asset('/icon/no-img-cat.png')); ?><?php endif; ?>" alt="Collection Image">
                            </a>
                        </div>
                        <p style=" font-weight: 600;margin: 5px 0px 0px 0px;"><?php echo e($collection->name); ?> </p>
                        <?php
                            $categoryIds = $collection->categories->pluck('id');
                            $productIds = DB::table('category_product')
                                ->whereIn('category_id', $categoryIds)
                                ->get()
                                ->pluck('product_id');
                            $products = \App\Models\Product::whereIn('id', $productIds)
                                ->where('status', 1)
                                ->count();
                        ?>
                        <p><?php echo e($products); ?> products</p>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</div><?php /**PATH /home/apleefix/shopping.apleefix.com/resources/views/frontend/partial/index/cat_small_summery.blade.php ENDPATH**/ ?>