

<?php $__env->startSection('title'); ?>
    <title><?php echo e($seo_setting->seo_title); ?></title>
    <meta name="title" content="<?php echo e($seo_setting->seo_title); ?>">
    <meta name="description" content="<?php echo e($seo_setting->seo_description); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('frontend-content'); ?>
    <!--=============================
        BREADCRUMB START
    ==============================-->
    <section class="wsus__breadcrumb" style="background: url(<?php echo e(asset('frontend/images/breadcrumb_bg.jpg')); ?>);">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="wsus__breadcrumb_text">
                        <h1><?php echo e(__('user.Blog')); ?></h1>
                        <ul class="d-flex flex-wrap">
                            <li><a href="<?php echo e(route('home')); ?>"><?php echo e(__('user.Home')); ?></a></li>
                            <li><a href="javascript:;"><?php echo e(__('user.Blog')); ?></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--=============================
        BREADCRUMB END
    ==============================-->

    <?php if($blog_left_right == 1): ?>
    <!--=============================
        BLOG LEFTBAR START
    ==============================-->
    <section class="wsus__blog_leftbar mt_120 xs_mt_80 pb_120 xs_pb_80">
        <div class="container">
            <div class="row">
                <div class="col-xl-4 col-lg-4">
                    <div class="wsus__sidebar">
                        <div class="wsus__sidebar_item wsus__sidebar_search mt-0">
                            <h3><?php echo e(__('user.Search')); ?></h3>
                            <form id="search_form">
                                <input type="text" name="keyword" id="keyword" value="<?php echo e(request()->get('keyword')); ?>" placeholder="<?php echo e(__('user.Search')); ?>">
                                <button type="submit"><i class="fas fa-search"></i></button>
                            </form>
                        </div>
                        <div class="wsus__sidebar_item wsus__sidebar_blog">
                            <h3><?php echo e(__('user.Popular Post')); ?></h3>
                            <ul>
                                <?php $__currentLoopData = $popular_blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li>
                                    <div class="img">
                                        <img src="<?php echo e(custom_asset($blog->image)); ?>" alt="blog" class="img-fluid w-100">
                                    </div>
                                    <div class="text">
                                        <a href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e($blog->bloglanguagefrontend->title); ?></a>
                                        <p><i class="fas fa-calendar-alt"></i> <?php echo e(Carbon\Carbon::parse($blog->created_at)->format('d-m-Y')); ?></p>
                                    </div>
                                </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                        <div class="wsus__sidebar_item wsus__sidebar_categories">
                            <h3><?php echo e(__('user.Categories')); ?></h3>
                            <ul>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php
                                    $total_blog = App\Models\Blog::where(['blog_category_id' => $category->id, 'status' => 1])->count();
                                ?>
                                <li><a href="javascript:;" onclick="getCatSlug('<?php echo e($category->slug); ?>')"><?php echo e($category->blogcategorylanguagefrontend->category_name); ?> <span>(<?php echo e($total_blog); ?>)</span></a></li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                        <div class="wsus__sidebar_item wsus__sidebar_tags">
                            <h3><?php echo e(__('user.Popular Tags')); ?></h3>
                            <ul class="d-flex flex-wrap">
                                <?php $__currentLoopData = $popular_tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $popular_tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li><a href="javascript:;" onclick="getCatTag('<?php echo e(strtolower($popular_tag->tag_name)); ?>')"><?php echo e($popular_tag->tag_name); ?></a></li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>

                        <div class="wsus__sidebar_item wsus__sidebar_subscribe"
                            style="background: url(<?php echo e(custom_asset($subscriber->image)); ?>);">
                            <div class="wsus__sidebar_subscribe_overlay">
                                <h3><?php echo e($subscriber->title); ?></h3>
                                <p><?php echo clean($subscriber->description); ?></p>
                                <form id="subscriberForm">
                                    <?php echo csrf_field(); ?>
                                    <input type="text" name="email" placeholder="<?php echo e(__('user.Enter Your Email Address')); ?>">
                                    <button class="common_btn" id="subSubmitBtn" type="submit"><?php echo e(__('user.Subscribe')); ?></button>
                                    <button class="common_btn d-none" id="subShowSpain" type="submit"><i class="fas fa-spinner fa-spin"></i></button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xl-8 col-lg-8">
                    <div class="row">
                        <?php $__empty_1 = true; $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <div class="col-xl-6 col-md-6">
                            <div class="wsus__blog_3">
                                <div class="wsus__blog_3_img">
                                    <img src="<?php echo e(custom_asset($blog->image)); ?>" alt="blog" class="img-fluid w-100">
                                </div>
                                <div class="wsus__blog_3_text">
                                    <a class="categori" href="javascript:;"><?php echo e(\Carbon\Carbon::parse($blog->created_at)->format('d M')); ?></a>
                                    <a class="title" href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e($blog->bloglanguagefrontend->title); ?></a>
                                    <p class="description"><?php echo e($blog->bloglanguagefrontend->short_description); ?></p>
                                    <ul>
                                        <li><a href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e(__('user.Read More')); ?></a></li>
                                        <li>
                                            <div class="img">
                                                <img src="<?php echo e(custom_asset($blog->admin->image)); ?>" alt="author"
                                                    class="img-fluid w-100">
                                            </div>
                                            <p><span><?php echo e(__('user.By')); ?></span> <?php echo e($blog->admin->name); ?> </p>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <div class="col-12 text-center mt-5">
                            <h2 class="text-danger"><?php echo e(__('user.Blog Not Found')); ?></h2>
                       </div>
                        <?php endif; ?>
                    </div>
                    <div class="wsus__pagination mt_25">
                        <div class="row">
                            <?php echo e($blogs->links('custom_pagination')); ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--=============================
        BLOG LEFTBAR END
    ==============================-->
    <?php endif; ?>

    <?php if($blog_left_right == 0): ?>
    <!--=============================
        BLOG START
    ==============================-->
    <section class="wsus__blog mt_120 xs_mt_80 pb_120 xs_pb_80">
        <div class="container">
            <div class="row">
                <?php $__empty_1 = true; $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="col-lg-4 col-md-6">
                    <div class="wsus__blog_3">
                        <div class="wsus__blog_3_img">
                            <img src="<?php echo e(custom_asset($blog->image)); ?>" alt="blog" class="img-fluid w-100">
                        </div>
                        <div class="wsus__blog_3_text">
                            <a class="categori" href="javascript:;"><?php echo e(\Carbon\Carbon::parse($blog->created_at)->format('d M')); ?></a>
                            <a class="title" href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e($blog->bloglanguagefrontend->title); ?></a>
                            <p class="description"><?php echo e($blog->bloglanguagefrontend->short_description); ?></p>
                            <ul>
                                <li><a href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e(__('user.Read More')); ?></a></li>
                                <li>
                                    <div class="img">
                                        <img src="<?php echo e(custom_asset($blog->admin->image)); ?>" alt="author" class="img-fluid w-100">
                                    </div>
                                    <p><span><?php echo e(__('user.By')); ?></span> <?php echo e($blog->admin->name); ?> </p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="col-12 text-center">
                        <h2 class="text-danger"><?php echo e(__('user.Blog Not Found')); ?></h2>
                    </div>
                <?php endif; ?>
            </div>
            <div class="wsus__pagination blog_list mt_25">
                <div class="row">
                    <?php echo e($blogs->links('custom_pagination')); ?>

                </div>
            </div>
        </div>
    </section>
    <!--=============================
        BLOG END
    ==============================-->
    <?php endif; ?>

    <?php if($blog_left_right == 2): ?>
    <!--=============================
        BLOG RIGHTBAR START
    ==============================-->
    <section class="wsus__blog_rightbar mt_120 xs_mt_80 pb_120 xs_pb_80">
        <div class="container">
            <div class="row">
                <div class="col-xl-8 col-lg-8">
                    <div class="row">
                        <?php $__empty_1 = true; $__currentLoopData = $blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <div class="col-xl-6 col-md-6">
                            <div class="wsus__blog_3">
                                <div class="wsus__blog_3_img">
                                    <img src="<?php echo e(custom_asset($blog->image)); ?>" alt="blog" class="img-fluid w-100">
                                </div>
                                <div class="wsus__blog_3_text">
                                    <a class="categori" href="javascript:;"><?php echo e(\Carbon\Carbon::parse($blog->created_at)->format('d M')); ?></a>
                                    <a class="title" href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e($blog->bloglanguagefrontend->title); ?></a>
                                    <p class="description"><?php echo e($blog->bloglanguagefrontend->short_description); ?></p>
                                    <ul>
                                        <li><a href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e(__('user.Read More')); ?></a></li>
                                        <li>
                                            <div class="img">
                                                <img src="<?php echo e(custom_asset($blog->admin->image)); ?>" alt="author"
                                                    class="img-fluid w-100">
                                            </div>
                                            <p><span><?php echo e(__('user.By')); ?></span> <?php echo e($blog->admin->name); ?> </p>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <div class="col-12 text-center mt-5">
                            <h2 class="text-danger"><?php echo e(__('user.Blog Not Found')); ?></h2>
                       </div>
                        <?php endif; ?>
                    </div>
                    <div class="wsus__pagination mt_25">
                        <div class="row">
                            <?php echo e($blogs->links('custom_pagination')); ?>

                        </div>
                    </div>
                </div>
                <div class="col-xl-4 col-lg-4">
                    <div class="wsus__sidebar">
                        <div class="wsus__sidebar_item wsus__sidebar_search mt-0">
                            <h3><?php echo e(__('user.Search')); ?></h3>
                            <form id="search_form">
                                <input type="text" name="keyword" id="keyword" value="<?php echo e(request()->get('keyword')); ?>" placeholder="<?php echo e(__('user.Search')); ?>">
                                <button type="submit"><i class="fas fa-search"></i></button>
                            </form>
                        </div>
                        <div class="wsus__sidebar_item wsus__sidebar_blog">
                            <h3><?php echo e(__('user.Popular Post')); ?></h3>
                            <ul>
                                <?php $__currentLoopData = $popular_blogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li>
                                    <div class="img">
                                        <img src="<?php echo e(custom_asset($blog->image)); ?>" alt="blog" class="img-fluid w-100">
                                    </div>
                                    <div class="text">
                                        <a href="<?php echo e(route('blog', $blog->slug)); ?>"><?php echo e($blog->bloglanguagefrontend->title); ?></a>
                                        <p><i class="fas fa-calendar-alt"></i> <?php echo e(Carbon\Carbon::parse($blog->created_at)->format('d-m-Y')); ?></p>
                                    </div>
                                </li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                        <div class="wsus__sidebar_item wsus__sidebar_categories">
                            <h3><?php echo e(__('user.Categories')); ?></h3>
                            <ul>
                                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php
                                    $total_blog = App\Models\Blog::where(['blog_category_id' => $category->id, 'status' => 1])->count();
                                ?>
                                <li><a href="javascript:;" onclick="getCatSlug('<?php echo e($category->slug); ?>')"><?php echo e($category->blogcategorylanguagefrontend->category_name); ?> <span>(<?php echo e($total_blog); ?>)</span></a></li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>
                        <div class="wsus__sidebar_item wsus__sidebar_tags">
                            <h3><?php echo e(__('user.Popular Tags')); ?></h3>
                            <ul class="d-flex flex-wrap">
                                <?php $__currentLoopData = $popular_tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $popular_tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li><a href="javascript:;" onclick="getCatTag('<?php echo e(strtolower($popular_tag->tag_name)); ?>')"><?php echo e($popular_tag->tag_name); ?></a></li>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </ul>
                        </div>

                        <div class="wsus__sidebar_item wsus__sidebar_subscribe"
                            style="background: url(<?php echo e(custom_asset($subscriber->image)); ?>);">
                            <div class="wsus__sidebar_subscribe_overlay">
                                <h3><?php echo e($subscriber->title); ?></h3>
                                <p><?php echo clean($subscriber->description); ?></p>
                                <form id="subscriberForm">
                                    <?php echo csrf_field(); ?>
                                    <input type="text" name="email" placeholder="<?php echo e(__('user.Enter Your Email Address')); ?>">
                                    <button class="common_btn" id="subSubmitBtn" type="submit"><?php echo e(__('user.Subscribe')); ?></button>
                                    <button class="common_btn d-none" id="subShowSpain" type="submit"><i class="fas fa-spinner fa-spin"></i></button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--=============================
        BLOG RIGHTBAR END
    ==============================-->
    <?php endif; ?>


    <form action="<?php echo e(route('blogs')); ?>" id="blogSearchForm">

        <?php if(request()->has('keyword')): ?>
        <input type="hidden" name="keyword" value="<?php echo e(request()->get('keyword')); ?>" id="keyword_form">
        <?php else: ?>
        <input type="hidden" name="keyword" value="" id="keyword_form">
        <?php endif; ?>

        <?php if(request()->has('category')): ?>
            <input type="hidden" name="category" value="<?php echo e(request()->get('category')); ?>" id="category_form">
        <?php else: ?>
            <input type="hidden" name="category" value="" id="category_form">
        <?php endif; ?>

    </form>

<?php $__env->stopSection(); ?>
<?php $__env->startPush('frontend_js'); ?>
<script>
    (function($) {
        "use strict";
        $(document).ready(function () {
            $("#blogCommentForm").on('submit', function(e){
                e.preventDefault();
                $('#showspin').removeClass('d-none');
                $('#submitBtn').addClass('d-none');
                submitBtn
                var isDemo = "<?php echo e(env('APP_MODE')); ?>"
                if(isDemo == 'DEMO'){
                    toastr.error('This Is Demo Version. You Can Not Change Anything');
                    return;
                }
                $.ajax({
                    type: 'POST',
                    data: $('#blogCommentForm').serialize(),
                    url: "<?php echo e(route('blog-comment')); ?>",
                    success: function (response) {
                        if(response.status == 1){
                            toastr.success(response.message)
                            $("#blogCommentForm").trigger("reset");
                            $('#showspin').addClass('d-none');
                            $('#submitBtn').removeClass('d-none');
                        }
                    },
                    error: function(response) {
                        $('#showspin').addClass('d-none');
                        $('#submitBtn').removeClass('d-none');
                        if(response.responseJSON.errors.name)toastr.error(response.responseJSON.errors.name[0])
                        if(response.responseJSON.errors.email)toastr.error(response.responseJSON.errors.email[0])
                        if(response.responseJSON.errors.comment)toastr.error(response.responseJSON.errors.comment[0])

                        if(!response.responseJSON.errors.name && !response.responseJSON.errors.email && !response.responseJSON.errors.comment){
                            toastr.error("<?php echo e(__('user.Please complete the recaptcha to submit the form')); ?>")
                        }
                    }
                });
            });


            $("#subscriberForm").on('submit', function(e){
                e.preventDefault();
                $('#subShowSpain').removeClass('d-none');
                $('#subSubmitBtn').addClass('d-none');
                var isDemo = "<?php echo e(env('APP_MODE')); ?>"
                if(isDemo == 'DEMO'){
                    toastr.error('This Is Demo Version. You Can Not Change Anything');
                    return;
                }

                let loading = "<?php echo e(__('user.Processing...')); ?>"

                $("#subscribe_btn").html(loading);
                $("#subscribe_btn").attr('disabled',true);

                $.ajax({
                    type: 'POST',
                    data: $('#subscriberForm').serialize(),
                    url: "<?php echo e(route('subscribe-request')); ?>",
                    success: function (response) {
                        if(response.status == 1){
                            toastr.success(response.message);
                            let subscribe = "<?php echo e(__('user.Subscribe')); ?>"
                            $("#subscribe_btn").html(subscribe);
                            $("#subscribe_btn").attr('disabled',false);
                            $("#subscriberForm").trigger("reset");
                            $('#subShowSpain').addClass('d-none');
                            $('#subSubmitBtn').removeClass('d-none');
                        }

                        if(response.status == 0){
                            toastr.error(response.message);
                            let subscribe = "<?php echo e(__('user.Subscribe')); ?>"
                            $("#subscribe_btn").html(subscribe);
                            $("#subscribe_btn").attr('disabled',false);
                            $("#subscriberForm").trigger("reset");
                            $('#subShowSpain').addClass('d-none');
                            $('#subSubmitBtn').removeClass('d-none');
                        }
                    },
                    error: function(err) {
                        $('#subShowSpain').addClass('d-none');
                        $('#subSubmitBtn').removeClass('d-none');
                        toastr.error('Something went wrong');
                        let subscribe = "<?php echo e(__('user.Subscribe')); ?>"
                            $("#subscribe_btn").html(subscribe);
                            $("#subscribe_btn").attr('disabled',false);
                            $("#subscriberForm").trigger("reset");
                    }
                });
            });

            $("#search_form").on("submit", function(e){
                e.preventDefault();
                $("#keyword_form").val($("#keyword").val());
                $("#blogSearchForm").submit();
            });

        });
    })(jQuery);

    function getCatSlug(slug){
        $("#category_form").val(slug);
        $("#blogSearchForm").submit();
    }

    function getCatTag(tag){
        $("#keyword_form").val(tag);
        $("#blogSearchForm").submit();
    }

</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make($active_theme, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u453274677/domains/gamekall.in/public_html/resources/views/blog.blade.php ENDPATH**/ ?>