<div class="col-md-4 sidebar">

    <div class="right">

        <div class="widget">
            <h4 class="title">热门文章</h4>
            @foreach($articles = articles(1,10,'hot') as $key => $article)
                <div class="service-content">
                    <p><span class="label label-success">{{$key+1}}</span> <a
                            href="{{single_path($article->id)}}">{{$article->title}}</a>
                    </p>
                    <div class="post-meta">{{$article->view}} 次
                    </div>
                </div>
            @endforeach
        </div>

        <div class="widget">
            <h4 class="title">最新文章</h4>
            @foreach($articles = articles(1,10,'new') as $key => $article)
                <div class="service-content">
                    <p><span class="label label-success">{{$key+1}}</span> <a
                            href="{{single_path($article->id)}}">{{$article->title}}</a>
                    </p>
                    <div class="post-meta">{{created_at_date($article->created_at)}}
                    </div>
                </div>
            @endforeach
        </div>

        <div class="sons">
            <div class="title">
                <div class="titleleft"></div>
                分类
            </div>
            <div class="cont">
                @foreach(categories() as $category)
                    <a href="{{category_path($category->id)}}">{{$category->name}}</a>
                @endforeach

            </div>
        </div>

        <div class="sons">
            <div class="title">
                <div class="titleleft"></div>
                标签
            </div>
            <div class="cont">
                @foreach(tags(30) as $tag)
                    <a href="{{tag_path($tag->id)}}">{{$tag->tag_name}}</a>
                @endforeach

            </div>
        </div>

    </div>

</div>
