
<?php $__env->startSection('body'); ?>


<?php

$activeslider = DB::table('sliders')->orderBy('id','DESC')->first();
$slidermore = DB::table('sliders')->orderBy('id','DESC')->skip(1)->limit(2)->get();
$setting = DB::table('settings')->first();

?>

<main>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-12">
                <div class="main-marquee">
                    <marquee><?php echo e($setting->marque); ?></marquee>
                </div>
                <div id="carouselExampleFade" class="carousel slide carousel-fade pt-2" data-bs-ride="carousel">
                    <div class="carousel-inner">
                        <div class="carousel-item active">
                            <a href="<?php echo e($activeslider->url); ?>"><img class="d-block w-100 rounded" src="<?php echo e(asset('public/sliderImage')); ?>/<?php echo e($activeslider->image); ?>" id="sliderimage"></a>
                        </div>
                        <?php if(isset($slidermore)): ?>
                        <?php $__currentLoopData = $slidermore; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $slidermoredata): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="carousel-item">
                            <a href="<?php echo e($slidermoredata->url); ?>">
                                <img src="<?php echo e(asset('public/sliderImage')); ?>/<?php echo e($slidermoredata->image); ?>" class="d-block w-100 rounded banner-image">
                            </a>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>

                    </div>
                    <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="prev">
                        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                        <span class="visually-hidden">Previous</span>
                    </button>
                    <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleFade" data-bs-slide="next">
                        <span class="carousel-control-next-icon" aria-hidden="true"></span>
                        <span class="visually-hidden">Next</span>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <section>
        <div class="container">

            <div class="head mb-4 mt-5"></div>

            <div class="row g-3">
                <?php

                $category=DB::table('product_category')
                ->join('product_item', 'product_category.item_id', 'product_item.id')
                ->select('product_category.*','product_item.item_name')->get();
                ?>

                <?php if(isset($category)): ?>
                <?php $__currentLoopData = $category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                $category_name=str_replace(" ","-",$i->category_name)
                ?>
                <div class="col-6 col-lg-2">
                    <div class="category h-100">
                        <a href="<?php echo e(url('category')); ?>/<?php echo e($category_name); ?>/<?php echo e($i->id); ?>" class="category__link">
                            <?php if($i->image == NULL): ?>
                            <!-- <?php echo e(asset('public/itemImage')); ?>/<?php echo e($i->image); ?> -->
                            <img src="<?php echo e(asset('public/fontdev/')); ?>/img/demo.jpg" class="category__img">
                            <?php else: ?>
                            <img src="<?php echo e(asset('public/categoryImage/')); ?>/<?php echo e($i->image); ?>" class="category__img">
                            <?php endif; ?>

                            <h5 class="category__title" style="font-size: 14px;"><?php echo e($i->category_name); ?></h5>
                        </a>
                    </div>
                </div>

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

            <?php
            $offerbanner = DB::table('explore_banners')->limit(4)->get();
            ?>

            <?php
            $itemcat = DB::table('product_item')->orderBy('sl','ASC')->limit(5)->get();
            ?>

            <?php if(isset($itemcat)): ?>
            <?php $__currentLoopData = $itemcat; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $itemcats): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
            $item_name=str_replace(" ","-",$itemcats->item_name);
            $product = DB::table('product_productinfo')->where('item_id',$itemcats->id)->where('status',1)->orderBy('id','DESC')->limit(12)->get();
            ?>



            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php endif; ?>
        </div>
    </section>
</main>




<?php $__env->stopSection(); ?>
<?php echo $__env->make('User.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\xampp\htdocs\office\electronics\resources\views/User/layouts/home.blade.php ENDPATH**/ ?>