<?php if(count($posts)): ?>
    <ul class="list-unstyled">
        <?php $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <li class="media">
                <div class="media-left">
                    <a href="<?php echo e(route('users.show', [$post->user_id]), false); ?>">
                        <img class="media-object img-thumbnail mr-3" style="width: 52px; height: 52px;"
                             src="<?php echo e($post->user->avatar, false); ?>" title="<?php echo e($post->user->name, false); ?>">
                    </a>
                </div>
                <div class="media-body">

                    <div class="media-heading mt-0 mb-1">
                        <a href="<?php echo e($post->link(), false); ?>" title="<?php echo e($post->title, false); ?>">
                            <?php echo e($post->title, false); ?>

                        </a>
                        <a class="float-right" href="<?php echo e($post->link(), false); ?>">
                            <span class="badge badge-secondary badge-pill <?php if ($post->reply_count > 0){echo "reply-back";} ?>"> <?php echo e($post->reply_count, false); ?> </span>
                        </a>
                    </div>

                    <small class="media-body meta text-secondary">

                        <a class="text-secondary list-category <?php switch ($post->category->title){
                            case '分享':
                                echo 'list-default';
                                break;
                            case '教程':
                                echo 'list-success';
                                break;
                            case '问答':
                                echo 'list-info';
                                break;
                            case '公告':
                                echo 'list-orange';
                                break;
                  } ?>" href="<?php echo e($post->link(["cate"=>$post->category_id]), false); ?>"
                           title="<?php echo e($post->category->title, false); ?>">
                            <i class="far fa-folder"></i>
                            <?php echo e($post->category->title, false); ?>

                        </a>

                        <span> • </span>
                        <a class="text-secondary" href="<?php echo e(route('users.show', [$post->user_id]), false); ?>"
                           title="<?php echo e($post->user->name, false); ?>">
                            <i class="far fa-user"></i>
                            <?php echo e($post->user->name, false); ?>

                        </a>
                        <span> • </span>
                        <i class="far fa-clock"></i>
                        <span class="timeago"
                              title="最后活跃于：<?php echo e($post->updated_at, false); ?>"><?php echo e($post->updated_at->diffForHumans(), false); ?></span>
                    </small>

                </div>
            </li>

            <?php if( ! $loop->last): ?>
                <hr>
            <?php endif; ?>

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

<?php else: ?>
    <div class="empty-block">暂无数据 ~_~</div>
<?php endif; ?>
<?php /**PATH C:\Users\Administrator\Desktop\1\jiangqiangdexiaocao-master\resources\views/posts/_post_list.blade.php ENDPATH**/ ?>