
<?php $__env->startSection('meta_title', $post->meta_title ?? $post->title); ?>
<?php $__env->startSection('meta_keywords', $post->meta_keywords ?? 'news, article'); ?>
<?php $__env->startSection('meta_description', $post->meta_description ?? Str::limit(strip_tags($post->content), 150)); ?>

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

    <!-- Breadcrumb Start -->
    <div class="breadcrumb-wrap">
        <div class="container">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="#">Home</a></li>
                <li class="breadcrumb-item"><a href="#">News</a></li>
                <li class="breadcrumb-item active">News details</li>
            </ul>
        </div>
    </div>
    <!-- Breadcrumb End -->

    <!-- Single News Start-->
    <div class="single-news">
        <div class="container">
            <div class="row">
                <div class="col-lg-8">
                    <div class="sn-container">
                        <div class="sn-img">
                            <img src="<?php echo e(asset($post->post_image)); ?>" alt="<?php echo e($post->title); ?>" />
                        </div>
                        <div class="sn-content">
                            <h1 class="sn-title"><?php echo e($post->title); ?></h1>
                            <?php echo $post->content; ?>

                        </div>
                    </div>
                    <div class="sn-related">
                        <h2>Related News</h2>
                        <div class="row sn-slider">
                            <?php $__currentLoopData = $btmrtldPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $btmrtldPost): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-md-4">
                                    <div class="sn-img">
                                        <img src="<?php echo e(asset($btmrtldPost->post_image)); ?>"
                                            alt="<?php echo e($btmrtldPost->title); ?>">
                                        <div class="sn-title">
                                            <a
                                                href="<?php echo e(route('post.view', $btmrtldPost->slug)); ?>"><?php echo e(Str::limit($btmrtldPost->title, 70)); ?></a>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>

                    <!-- Comments Section Start -->
                    <div class="sn-comments mt-5">
                      

                        
                        <div class="comment-form mb-4">
                            <h3>Leave a Comment</h3>

                            <form action="<?php echo e(route('post.comments')); ?>" method="POST" class="comment-form">
                                <?php echo csrf_field(); ?>

                                <input type="hidden" name="post_id" value="<?php echo e($post->id); ?>">

                                
                                <div class="form-group mb-2">
                                    <input type="text" name="name"
                                        class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Your Name"
                                        value="<?php echo e(old('name')); ?>" required>
                                    <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <div class="invalid-feedback"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                
                                <div class="form-group mb-2">
                                    <input type="email" name="email"
                                        class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" placeholder="Your Email"
                                        value="<?php echo e(old('email')); ?>" required>
                                    <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <div class="invalid-feedback"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                
                                <div class="form-group mb-2">
                                    <textarea name="content" class="form-control <?php $__errorArgs = ['content'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" rows="4"
                                        placeholder="Your Comment" required><?php echo e(old('content')); ?></textarea>
                                    <?php $__errorArgs = ['content'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                        <div class="invalid-feedback"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>

                                <button type="submit" class="btn btn-primary">Submit Comment</button>
                            </form>
                        </div>


                        <h2>Comments</h2>
                        <div class="comments-list ">
                            <?php $__empty_1 = true; $__currentLoopData = $post->comments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <div class="comment mb-3 p-3 border rounded">
                                    <strong><?php echo e($comment->name); ?></strong>
                                    <span class="text-muted small"><?php echo e($comment->created_at->diffForHumans()); ?></span>
                                    <div><?php echo e($comment->content); ?></div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <p>No comments yet. Be the first to comment!</p>
                            <?php endif; ?>
                        </div>

                    </div>
                    <!-- Comments Section End -->
                </div>

                <div class="col-lg-4">
                    <div class="sidebar">
                        <div class="sidebar-widget">
                            <h2 class="sw-title">In This Category</h2>
                            <div class="news-list">
                                <?php $__currentLoopData = $relatedPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rpost): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="nl-item">
                                        <div class="nl-img">
                                            <img src="<?php echo e(asset($rpost->post_image)); ?>"
                                                alt="<?php echo e($rpost->title); ?>">
                                        </div>
                                        <div class="nl-title">
                                            <a
                                                href="<?php echo e(route('post.view', $rpost->slug)); ?>"><?php echo e(Str::limit($rpost->title, 70)); ?></a>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>


                        

                        <div class="sidebar-widget">
                            <div class="tab-news">
                                <ul class="nav nav-pills nav-justified">
                                    <li class="nav-item">
                                        <a class="nav-link active" data-toggle="pill" href="#featured">Featured</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="pill" href="#popular">Popular</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="pill" href="#latest">Latest</a>
                                    </li>
                                </ul>

                                <div class="tab-content">
                                    
                                    <div id="featured" class="container tab-pane active">
                                        <?php $__currentLoopData = $featuredPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="tn-news">
                                                <div class="tn-img">
                                                    <img src="<?php echo e(asset($post->post_image)); ?>"
                                                        alt="<?php echo e($post->title); ?>">
                                                </div>
                                                <div class="tn-title">
                                                    <a
                                                        href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 70)); ?></a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>

                                    
                                    <div id="popular" class="container tab-pane fade">
                                        <?php $__currentLoopData = $popularPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="tn-news">
                                                <div class="tn-img">
                                                    <img src="<?php echo e(asset($post->post_image)); ?>"
                                                        alt="<?php echo e($post->title); ?>">
                                                </div>
                                                <div class="tn-title">
                                                    <a
                                                        href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 70)); ?></a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>

                                    
                                    <div id="latest" class="container tab-pane fade">
                                        <?php $__currentLoopData = $latestPosts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="tn-news">
                                                <div class="tn-img">
                                                    <img src="<?php echo e(asset($post->post_image)); ?>"
                                                        alt="<?php echo e($post->title); ?>">
                                                </div>
                                                <div class="tn-title">
                                                    <a
                                                        href="<?php echo e(route('post.view', $post->slug)); ?>"><?php echo e(Str::limit($post->title, 70)); ?></a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </div>
                                </div>
                            </div>
                        </div>


                        

                        <div class="sidebar-widget">
                            <h2 class="sw-title">News Category</h2>
                            <div class="category">
                                <ul>
                                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <li>
                                            <a href="<?php echo e(route('category', $category->slug)); ?>"><?php echo e($category->name); ?></a>
                                            <span>(<?php echo e($category->posts_count); ?>)</span>
                                        </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </ul>

                            </div>
                        </div>

                        

                        <div class="sidebar-widget">
                            <h2 class="sw-title">Tags Cloud</h2>
                            <div class="tags">
                                <?php $__currentLoopData = $tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <a href="<?php echo e(route('tag', $tag->slug)); ?>"><?php echo e($tag->name); ?></a>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Single News End-->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('frontend.layouts.main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\NEWXAMP\htdocs\nitinnewsproject\resources\views/frontend/post-details.blade.php ENDPATH**/ ?>