laravel-learn-bbs/resources/views/users/_topics.blade.php

23 lines
640 B
PHP
Raw Permalink Normal View History

2018-01-01 07:32:35 +00:00
@if (count($topics))
<ul class="list-group">
@foreach ($topics as $topic)
<li class="list-group-item">
2018-01-01 13:22:16 +00:00
<a href="{{ route('topics.show', [$topic->id,$topic->slug]) }}">
2018-01-01 07:32:35 +00:00
{{ $topic->title }}
</a>
<span class="meta pull-right">
{{ $topic->reply_count }} 回复
<span> </span>
{{ $topic->created_at->diffForHumans() }}
</span>
</li>
@endforeach
</ul>
@else
<div class="empty-block">暂无数据 ~_~</div>
@endif
{{-- 分页 --}}
{!! $topics->render() !!}