

<?php $__env->startSection('breadcrumb'); ?>
<?php echo e(__('blog.blog')); ?>

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

<link rel="stylesheet" href="<?php echo e(asset(asset_path('frontend/default/css/page_css/blog/posts.css'))); ?>" />
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>

<?php echo $__env->make('frontend.default.partials._breadcrumb', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<!-- blog part here -->
<section class="blog_part bg-white padding_top">
    <div class="container">
        <div class="row">
            <div class="col-lg-9">
                <div class="blog_post">
                <?php if($posts->count() > 0): ?>
                   <?php $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="single_blog_post d-flex align-items-center">
                        <div class="single_blog_post_img" >
                            <div class="blog_img_main_div">
                            <a class="blog_img_div" href="<?php echo e(route('blog.single.page',$post->slug)); ?>">
                              <img src="<?php echo e(isset($post->image_url)? showImage($post->image_url):showImage('backend/img/default.png')); ?>" alt="#">
                            </a>
                            </div>

                        </div>
                        <div class="single_blog_post_content">
                        <h4><a href="<?php echo e(route('blog.single.page',$post->slug)); ?>"><?php echo e($post->title); ?></a></h4>
                            <p><?php echo e($post->excerpt); ?></p>
                            <div class="blog_post_details">
                                <a href="javascript:void(0);"> <i class="ti-user"></i> <?php echo e($post->user->getFullNameAttribute()); ?> </a>
                                <a href="javascript:void(0);"> <i class="ti-calendar"></i> <?php echo e(\Carbon\Carbon::parse($post->published_at)->toDayDateTimeString()); ?></a>
                                <a href="<?php echo e(route('blog.single.page',$post->slug)); ?>"> <i class="ti-comment"></i> <?php echo e(count($post->comments)); ?> </a>
                                <a href="<?php echo e(route('blog.single.page',$post->slug)); ?>"><i class="ti-eye"></i><?php echo e($post->view_count); ?></a>
                                <a href="<?php echo e(route('blog.single.page',$post->slug)); ?>"><i class="ti-thumb-up"></i><?php echo e($post->like->count()); ?></a>


                            </div>
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php else: ?>
                    <div class="col-lg-12 col-md-12">
                        <div class="card h-100">
                            <div class="single-post post-style-1 p-2">
                            <strong><?php echo e(__('blog.no_post_found')); ?></strong>
                            </div><!-- single-post -->
                        </div><!-- card -->
                    </div><!-- col-lg-4 col-md-6 -->
                    <?php endif; ?>
                    </div>

                <div class="pagination_part">
                    <nav aria-label="Page navigation example">
                        <?php if($posts->lastPage() > 1): ?>
                        <ul class="pagination">
                            <li class="<?php echo e(($posts->currentPage() == 1) ? ' disabled' : ''); ?> page-item">
                                <a class="page-link" href="<?php echo e($posts->url(1)); ?>"><i class="ti-arrow-left"></i></a>
                            </li>
                            <?php for($i = 1; $i <= $posts->lastPage(); $i++): ?>
                                <li class="<?php echo e(($posts->currentPage() == $i) ? ' active' : ''); ?> page-item">
                                    <a class="page-link"  href="<?php echo e($posts->url($i)); ?>"><?php echo e($i); ?></a>
                                </li>
                            <?php endfor; ?>
                            <li class="<?php echo e(($posts->currentPage() == $posts->lastPage()) ? ' disabled' : ''); ?> page-item">
                                <a href="<?php echo e($posts->url($posts->currentPage()+1)); ?>" class="page-link" ><i class="ti-arrow-right"></i></a>
                            </li>
                        </ul>
                        <?php endif; ?>
                    </nav>
                </div>

            </div>

            <?php echo $__env->make('frontend.default.pages.blog.partials._sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        </div>
    </div>
</section>
<!-- blog part end -->


<?php $__env->stopSection(); ?>

<?php echo $__env->make('frontend.default.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/penastud/public_html/mart/resources/views/frontend/default/pages/blog/posts.blade.php ENDPATH**/ ?>